Skip to content

Commit 11ca9c9

Browse files
committed
one licence scan
1 parent 99cc5bb commit 11ca9c9

1 file changed

Lines changed: 9 additions & 63 deletions

File tree

.github/workflows/quality-checks.yml

Lines changed: 9 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -186,17 +186,20 @@ jobs:
186186
echo "Poetry version $POETRY_VERSION is outside the required range so not installing plugin-export"
187187
fi
188188
poetry export -f requirements.txt --with dev --without-hashes --output=requirements.txt
189-
- name: Check python licenses
189+
- name: download go dependencies
190+
if: ${{ steps.check_languages.outputs.uses_go == 'true' }}
191+
run: |
192+
cd src
193+
go mod vendor
194+
- name: Check licenses
190195
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
191-
if: ${{ steps.check_languages.outputs.uses_poetry == 'true' }}
192196
with:
193197
scan-type: "fs"
194-
skip-files: "**/poetry.lock,**/go.mod,**/pom.xml,**/package-lock.json"
195198
scan-ref: "."
196199
severity: "CRITICAL,HIGH"
197200
scanners: "license"
198201
format: "table"
199-
output: "license_scan_python.txt"
202+
output: "license_scan.txt"
200203
exit-code: "1"
201204
list-all-pkgs: "false"
202205
trivy-config: trivy.yaml
@@ -206,74 +209,17 @@ jobs:
206209
if: ${{ steps.check_languages.outputs.uses_poetry == 'true' }}
207210
run: |
208211
rm -f requirements.txt
209-
- name: Check node licenses
210-
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
211-
if: ${{ steps.check_languages.outputs.uses_node == 'true' }}
212-
with:
213-
scan-type: "fs"
214-
skip-files: "**/poetry.lock,**/go.mod,**/pom.xml"
215-
scan-ref: "."
216-
severity: "CRITICAL,HIGH"
217-
scanners: "license"
218-
format: "table"
219-
output: "license_scan_node.txt"
220-
exit-code: "1"
221-
list-all-pkgs: "false"
222-
trivy-config: trivy.yaml
223-
- name: download go dependencies
224-
if: ${{ steps.check_languages.outputs.uses_go == 'true' }}
225-
run: |
226-
cd src
227-
go mod vendor
228-
- name: Check go licenses
229-
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
230-
if: ${{ steps.check_languages.outputs.uses_go == 'true' }}
231-
with:
232-
scan-type: "fs"
233-
skip-files: "**/poetry.lock,**/package-lock.json,**/pom.xml"
234-
scan-ref: "."
235-
severity: "CRITICAL,HIGH"
236-
scanners: "license"
237-
format: "table"
238-
output: "license_scan_go.txt"
239-
exit-code: "1"
240-
list-all-pkgs: "false"
241-
trivy-config: trivy.yaml
242212
- name: clean go dependencies
243213
if: ${{ steps.check_languages.outputs.uses_go == 'true' }}
244214
run: |
245215
cd src
246216
rm -rf vendor
247-
- name: Check java licenses
248-
uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8
249-
if: ${{ steps.check_languages.outputs.uses_java == 'true' }}
250-
with:
251-
scan-type: "fs"
252-
skip-files: "**/poetry.lock,**/package-lock.json,**/go.mod"
253-
scan-ref: "."
254-
severity: "CRITICAL,HIGH"
255-
scanners: "license"
256-
format: "table"
257-
output: "license_scan_java.txt"
258-
exit-code: "1"
259-
list-all-pkgs: "false"
260-
trivy-config: trivy.yaml
261217
- name: Show license scan output
262218
if: always()
263219
run: |
264-
if [ -f license_scan_python.txt ]; then
265-
cat license_scan_python.txt
266-
fi
267-
if [ -f license_scan_node.txt ]; then
268-
cat license_scan_node.txt
220+
if [ -f license_scan.txt ]; then
221+
cat license_scan.txt
269222
fi
270-
if [ -f license_scan_go.txt ]; then
271-
cat license_scan_go.txt
272-
fi
273-
if [ -f license_scan_java.txt ]; then
274-
cat license_scan_java.txt
275-
fi
276-
277223
- name: Run code lint
278224
run: make lint
279225

0 commit comments

Comments
 (0)