|
30 | 30 | OTHER_TA_REQUIRED_CONFIGS: |
31 | 31 | description: other required configs |
32 | 32 | required: true |
| 33 | + FOSSA_API_KEY: |
| 34 | + description: API token for FOSSA app |
| 35 | + required: true |
33 | 36 |
|
34 | 37 | jobs: |
35 | 38 | meta: |
@@ -95,33 +98,30 @@ jobs: |
95 | 98 | id: sample-scanner |
96 | 99 | env: |
97 | 100 | REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GH_TOKEN }} |
98 | | - compliance-dependencies: |
99 | | - name: compliance-dependencies |
100 | | - runs-on: ubuntu-latest |
101 | 101 |
|
| 102 | + fossa-scan: |
| 103 | + continue-on-error: true |
| 104 | + runs-on: ubuntu-latest |
102 | 105 | steps: |
103 | | - - name: Checkout |
104 | | - uses: actions/checkout@v2 |
105 | | - - name: ort-action |
106 | | - uses: splunk/addonfactory-ort-action@v1.6 |
107 | | - id: ort-action |
108 | | - with: |
109 | | - WorkDir: . |
110 | | - UsePython3: "3.7" |
111 | | - - name: ort-action-artifacts-reports |
112 | | - uses: actions/upload-artifact@v2 |
113 | | - with: |
114 | | - name: analysis-reports |
115 | | - path: | |
116 | | - .ort/reports/* |
117 | | - if: always() |
118 | | - - name: ort-action-artifacts-analyzer |
| 106 | + - uses: actions/checkout@v3 |
| 107 | + - name: run fossa anlyze and create report |
| 108 | + run: | |
| 109 | + curl -H 'Cache-Control: no-cache' https://raw.githubusercontent.com/fossas/fossa-cli/master/install-latest.sh | bash |
| 110 | + fossa analyze --debug |
| 111 | + fossa report attribution --format text > /tmp/THIRDPARTY |
| 112 | + env: |
| 113 | + FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} |
| 114 | + - name: upload THIRDPARTY file |
119 | 115 | uses: actions/upload-artifact@v2 |
120 | 116 | with: |
121 | | - name: analysis-analyzer |
122 | | - path: | |
123 | | - .ort/analyzer/* |
124 | | - if: always() |
| 117 | + name: THIRDPARTY |
| 118 | + path: /tmp/THIRDPARTY |
| 119 | + - name: run fossa test |
| 120 | + run: | |
| 121 | + fossa test --debug |
| 122 | + env: |
| 123 | + FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} |
| 124 | + |
125 | 125 | compliance-copyrights: |
126 | 126 | name: compliance-copyrights |
127 | 127 | runs-on: ubuntu-latest |
@@ -183,37 +183,11 @@ jobs: |
183 | 183 | with: |
184 | 184 | publishToken: ${{ secrets.SEMGREP_PUBLISH_TOKEN }} |
185 | 185 |
|
186 | | -# Commentig it out as a INFRA-35392 |
187 | | -# TODO use FOSSA instead of SNYK |
188 | | - |
189 | | -# snyk: |
190 | | -# name: security-vuln-snyk |
191 | | -# runs-on: ubuntu-latest |
192 | | -# steps: |
193 | | -# - uses: actions/checkout@v2 |
194 | | -# - name: Setup python |
195 | | -# uses: actions/setup-python@v2 |
196 | | -# with: |
197 | | -# python-version: 3.7 |
198 | | -# - uses: snyk/actions/setup@master |
199 | | -# - uses: actions/setup-go@v2.1.5 |
200 | | -# with: |
201 | | -# go-version: "1.13" |
202 | | -# - name: Snyk monitor |
203 | | -# run: snyk test --sarif-file-output=snyk-scan_requirements.sarif --all-projects --print-deps --severity-threshold=high |
204 | | -# env: |
205 | | -# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
206 | | -# - uses: actions/upload-artifact@v2 |
207 | | -# if: always() |
208 | | -# with: |
209 | | -# name: snyk-results |
210 | | -# path: snyk-scan_requirements.sarif |
211 | | - |
212 | 186 | build: |
213 | 187 | name: build |
214 | 188 | runs-on: ubuntu-latest |
215 | 189 | needs: |
216 | | - - compliance-dependencies |
| 190 | + - fossa-scan |
217 | 191 | outputs: |
218 | 192 | buildname: ${{ steps.buildupload.outputs.name }} |
219 | 193 | steps: |
@@ -278,12 +252,11 @@ jobs: |
278 | 252 | PrNumber: ${{ github.event.number }} |
279 | 253 | - uses: actions/download-artifact@v2 |
280 | 254 | with: |
281 | | - name: analysis-reports |
282 | | - path: /tmp/analysis-reports |
| 255 | + name: THIRDPARTY |
| 256 | + path: /tmp/THIRDPARTY |
283 | 257 | - name: Update Notices |
284 | 258 | run: | |
285 | | - cp -f /tmp/analysis-reports/NOTICE_default THIRDPARTY || true |
286 | | - cp -f /tmp/analysis-reports/NOTICE_default package/THIRDPARTY || true |
| 259 | + cp -f /tmp/THIRDPARTY package/THIRDPARTY |
287 | 260 | - name: Build Package |
288 | 261 | id: uccgen |
289 | 262 | uses: splunk/addonfactory-ucc-generator-action@v1 |
@@ -1272,7 +1245,6 @@ jobs: |
1272 | 1245 | needs: |
1273 | 1246 | - meta |
1274 | 1247 | - compliance-sample-scanner |
1275 | | - - compliance-dependencies |
1276 | 1248 | - compliance-copyrights |
1277 | 1249 | - lint |
1278 | 1250 | - review_secrets |
|
0 commit comments