7272 compression-level : 9 # 0-9; 9 is max
7373
7474 # github.com/microsoft/sbom-tool
75- # github.com/microsoft/sbom-tool/blob/f5f65011f2/docs/sbom-tool-arguments.md?plain=1#L1
75+ # github.com/microsoft/sbom-tool/blob/f5f65011f2/docs/sbom-tool-arguments.md
7676 - name : 🧾 SBOM
7777 id : sbom-gen
7878 if : always()
@@ -291,71 +291,6 @@ jobs:
291291 SBOM_ARTIFACT_NAME : ${{ format('firestack-sbom-{0}', github.sha) }}
292292 GRYPE_SARIF : ${{ steps.gr.outputs.sarif }}
293293
294-
295- osv :
296- name : 🛡️ OSV scanner
297- runs-on : ubuntu-latest
298- permissions :
299- contents : read
300- packages : read
301- actions : read
302- security-events : write
303-
304- # github.com/hasansino/go42/blob/3be871dcfe/.github/workflows/140-security-extra.yaml#L102
305- steps :
306- - name : 🥏 Checkout
307- uses : actions/checkout@v6
308-
309- - name : 🔍 Scan
310- id : osv-scan
311- continue-on-error : true
312- uses : google/osv-scanner-action/osv-scanner-action@v2.2.2
313- with :
314- scan-args : --output=osv-scanner-results.json --format=json --all-vulns --recursive ./
315-
316- - name : 🧾 Report
317- if : ${{ steps.osv-scan.outcome != 'skipped' }}
318- continue-on-error : true
319- uses : google/osv-scanner-action/osv-reporter-action@v2.2.2
320- with :
321- scan-args : |-
322- --output=osv-scanner-results.sarif
323- --new=osv-scanner-results.json
324- --gh-annotations=true
325- --fail-on-vuln=true
326- --all-vulns
327-
328- - name : ⚖️ Licenses
329- continue-on-error : true
330- run : |
331- # installing osv-scanner is ... expensive
332- # github.com/google/osv-scanner/blob/main/README.md
333- if ! command -v osv-scanner >/dev/null 2>&1; then
334- go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest
335- fi
336- osv-scanner --licenses .
337-
338- # github.com/google/go-licenses?tab=readme-ov-file#build-tags
339- # go install github.com/google/go-licenses/v2@latest
340- # github.com/google/licenseclassifier/blob/e6a9bb99b5/license_type.go#L28
341- # go-licenses check ./... --include_tests --allowed_licenses=notice,permissive,reciprocal,unencumbered
342-
343- - name : 🚀 Upload
344- if : ${{ steps.osv-scan.outcome != 'skipped' }}
345- uses : actions/upload-artifact@v4
346- with :
347- name : " osv-scanner-results-${{ github.sha }}"
348- path : osv-scanner-results.sarif
349- retention-days : 72
350- compression-level : 9
351-
352- - name : 📡 OSV to code-scanning
353- if : ${{ steps.osv-scan.outcome != 'skipped' }}
354- continue-on-error : true
355- uses : github/codeql-action/upload-sarif@v4
356- with :
357- sarif_file : osv-scanner-results.sarif
358-
359294 attestation :
360295 name : 🪪 Artifact attestations
361296 needs : build
@@ -396,7 +331,7 @@ jobs:
396331 CLASSFULL : full
397332 CLASSDBG : debug
398333 # artifact bytecode sources
399- SOURCES : tun2socks-sources.jar
334+ SOURCES : build/intra/ tun2socks-sources.jar
400335 # POM for Maven Central
401336 POM_OSSRH : ossrhpom.xml
402337 DIST_DIR : dist
@@ -449,7 +384,7 @@ jobs:
449384 run : |
450385 set -euo pipefail
451386 # andrewlock.net/creating-sbom-attestations-in-github-actions/
452- predicate="https://spdx.dev/Document/v2.3 "
387+ predicate="https://spdx.dev/Document/v2.2 "
453388 jq -c '.subjects[]' <<<"$SBOM_INFO" | while read -r subject; do
454389 name=$(jq -r '.name' <<<"$subject")
455390 file="${ART_DIR}/${name##*/}"
@@ -557,8 +492,99 @@ jobs:
557492 curl -D - -X POST -H "Authorization: Bearer ${tok}" \
558493 "https://ossrh-staging-api.central.sonatype.com/manual/upload/defaultRepository/${GROUP_OSSRH}?publishing_type=automatic"
559494
495+ osv :
496+ name : 🛡️ OSV scanner
497+ runs-on : ubuntu-latest
498+ permissions :
499+ contents : read
500+ packages : read
501+ actions : read
502+ security-events : write
503+
504+ # github.com/hasansino/go42/blob/3be871dcfe/.github/workflows/140-security-extra.yaml#L102
505+ steps :
506+ - name : 🥏 Checkout
507+ uses : actions/checkout@v6
508+
509+ - name : 🔍 Scan
510+ id : osv-scan
511+ continue-on-error : true
512+ uses : google/osv-scanner-action/osv-scanner-action@v2.2.2
513+ with :
514+ scan-args : --output=osv-scanner-results.json --format=json --all-vulns --recursive ./
515+
516+ - name : 🧾 Report
517+ if : ${{ steps.osv-scan.outcome != 'skipped' }}
518+ continue-on-error : true
519+ uses : google/osv-scanner-action/osv-reporter-action@v2.2.2
520+ with :
521+ scan-args : |-
522+ --output=osv-scanner-results.sarif
523+ --new=osv-scanner-results.json
524+ --gh-annotations=true
525+ --fail-on-vuln=true
526+ --all-vulns
527+
528+ - name : ⚖️ Licenses
529+ continue-on-error : true
530+ run : |
531+ # installing osv-scanner is ... expensive
532+ # github.com/google/osv-scanner/blob/main/README.md
533+ if ! command -v osv-scanner >/dev/null 2>&1; then
534+ go install github.com/google/osv-scanner/v2/cmd/osv-scanner@latest
535+ fi
536+ osv-scanner --licenses .
537+
538+ # also: github.com/oss-review-toolkit/ort
539+
540+ # github.com/google/go-licenses?tab=readme-ov-file#build-tags
541+ # go install github.com/google/go-licenses/v2@latest
542+ # github.com/google/licenseclassifier/blob/e6a9bb99b5/license_type.go#L28
543+ # go-licenses check ./... --include_tests --allowed_licenses=notice,permissive,reciprocal,unencumbered
544+
545+ - name : 🚀 Upload
546+ if : ${{ steps.osv-scan.outcome != 'skipped' }}
547+ uses : actions/upload-artifact@v4
548+ with :
549+ name : " osv-scanner-results-${{ github.sha }}"
550+ path : osv-scanner-results.sarif
551+ retention-days : 72
552+ compression-level : 9
553+
554+ - name : 📡 OSV to code-scanning
555+ if : ${{ steps.osv-scan.outcome != 'skipped' }}
556+ continue-on-error : true
557+ uses : github/codeql-action/upload-sarif@v4
558+ with :
559+ sarif_file : osv-scanner-results.sarif
560+
561+ # github.com/oss-review-toolkit/ort-ci-github-action
562+ # github.com/oss-review-toolkit/ort
563+ ort :
564+ name : 🌈 ORT
565+ permissions :
566+ contents : read
567+ packages : read
568+ actions : read
569+ security-events : write
570+ runs-on : ubuntu-latest
571+ steps :
572+ - name : 🥏 Checkout
573+ uses : actions/checkout@v5
574+ - name : 🍭 Run
575+ uses : oss-review-toolkit/ort-ci-github-action@main
576+ with :
577+ run : >
578+ cache-dependencies,
579+ metadata-labels,
580+ analyzer,
581+ advisor,
582+ reporter,
583+ upload-results,
584+ upload-evaluation-result
585+
560586 checker :
561- name : 🔐 Security checker
587+ name : 🗳️ Security checker
562588 runs-on : ubuntu-latest
563589 permissions :
564590 security-events : write
@@ -568,7 +594,7 @@ jobs:
568594 steps :
569595 - name : 🥏 Checkout
570596 uses : actions/checkout@v4
571- - name : 🕵️ Gosec Scanner
597+ - name : 📀 Gosec Scanner
572598 uses : securego/gosec@master
573599 with :
574600 # github.com/securego/gosec/issues/1219
0 commit comments