From 9236bfbf97073bdc216d42e5139cc58647b3a839 Mon Sep 17 00:00:00 2001 From: Aman Riat Date: Tue, 13 Oct 2026 11:18:08 -0400 Subject: [PATCH] feat(cra): add SCA scanning and manifest registration (DATAGO-156546) Adds the shared FOSSA SCA scan and the solace-cloud-manifest write so this repo is covered by CRA compliance scanning in Guardian. - .github/.fossa.yml: FOSSA project config, passed via fossa.config because the CLI only auto-discovers it at the scan root. - .github/workflow-config.json: policy and vulnerability gates in REPORT mode, so findings are recorded without failing builds. - .github/workflows/sca-scan-and-guard.yml: runs the scan on PRs and pushes to main; only runs on main write to the manifest (squad: cto). Dependencies are resolved from package-lock.json. Scanning is read-only: no publish, release or image step is added. Co-Authored-By: Claude Opus 5.5 --- .github/.fossa.yml | 25 +++++++++++ .github/workflow-config.json | 8 ++++ .github/workflows/sca-scan-and-guard.yml | 56 ++++++++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 .github/.fossa.yml create mode 100644 .github/workflow-config.json create mode 100644 .github/workflows/sca-scan-and-guard.yml diff --git a/.github/.fossa.yml b/.github/.fossa.yml new file mode 100644 index 0000000..2da2a79 --- /dev/null +++ b/.github/.fossa.yml @@ -0,0 +1,25 @@ +version: 3 + +project: + locator: SolaceLabs_solace-queuebrowser-datasource + id: SolaceLabs_solace-queuebrowser-datasource + name: solace-queuebrowser-datasource + teams: [] + labels: + - javascript + +vendoredDependencies: + forceRescans: false + scanMethod: CLILicenseScan + licenseScanPathFilters: + exclude: + - "./.git" + - "./.github" + +paths: + exclude: + - ./.git + - ./.github + +telemetry: + scope: full diff --git a/.github/workflow-config.json b/.github/workflow-config.json new file mode 100644 index 0000000..cacb8de --- /dev/null +++ b/.github/workflow-config.json @@ -0,0 +1,8 @@ +{ + "sca_scanning": { + "fossa": { + "policy": { "mode": "REPORT" }, + "vulnerability": { "mode": "REPORT" } + } + } +} diff --git a/.github/workflows/sca-scan-and-guard.yml b/.github/workflows/sca-scan-and-guard.yml new file mode 100644 index 0000000..9b397bf --- /dev/null +++ b/.github/workflows/sca-scan-and-guard.yml @@ -0,0 +1,56 @@ +name: SCA Scan +on: + pull_request: + branches: [main] + push: + branches: [main] + # Allows the scan to be re-run against trunk without waiting for a push, which + # matters when a merge commit carries [skip ci] and produces no run at all. + workflow_dispatch: + +permissions: + contents: read + id-token: write + # Required by the shared SCA workflow, which declares it. A called workflow + # cannot be granted a permission the caller lacks, so removing this fails the + # whole run at startup with zero jobs and no annotation. + packages: read + actions: read + statuses: write + checks: write + pull-requests: write + +jobs: + sca_scan: + uses: SolaceDev/solace-public-workflows/.github/workflows/sca-scan-and-guard.yaml@c689e87fd881013c2e5009bf6e751b49cae7527b # main + with: + # .fossa.yml lives under .github/, so the CLI has to be pointed at it. + # Without this it silently falls back to defaults and registers the scan + # under a different project. + additional_scan_params: | + fossa.config=.github/.fossa.yml + # Pinned: the shared workflow still defaults to node 20, which is end-of-life. + node_version: "24" + setup_actions: '["setup-node"]' + secrets: + FOSSA_API_KEY: ${{ secrets.FOSSA_API_KEY }} + + # The reusable workflow owns the default-branch check, so a pull request run + # scans without writing and a run on trunk writes. + update_manifest: + needs: sca_scan + if: needs.sca_scan.result == 'success' + uses: SolaceDev/solace-public-workflows/.github/workflows/update-manifest.yaml@c689e87fd881013c2e5009bf6e751b49cae7527b # main + with: + table_name: solace-cloud-manifest + item: | + { + "squad": "cto", + "repository": "${{ github.event.repository.name }}", + "dev": { + "sha": "${{ github.sha }}", + "version": "${{ github.ref_name }}" + } + } + secrets: + MANIFEST_AWS_ROLE: ${{ secrets.MANIFEST_AWS_ROLE }}