Skip to content

Commit e3524c5

Browse files
committed
ci: add FOSSA license scan workflow
Adds a self-contained workflow_dispatch GitHub Actions workflow that runs FOSSA analyze + test against the repo, replacing the manual Jenkins-based scan. Token comes from the FOSSA_API_KEY org secret; the repo still needs to be added to that secret's repos allowlist in terraform-github (separate PR by infra) before the first dispatch will authenticate. Both fossas/fossa-action@v1.9.0 and actions/checkout@v6.0.2 are pinned by full commit SHA per public-repo best practice. The job has read-only permissions and uses ubuntu-latest (no internal runner / Vault dependency, unlike the gooddata/github-actions reference workflow). The .fossa.yml is scoped via paths.only to the seven published gooddata-* workspace packages and the generated gooddata-api-client. Phase 0 local verification with fossa-cli 3.17.5 confirmed all declared deps across these targets are picked up (pdm strategy for each pyproject.toml, setuptools for gooddata-api-client). tests-support and scripts/ are intentionally excluded as internal helpers. Note: this whitelist limits scanning to declared deps only — no transitive resolution. Switching to a root uv.lock scan would broaden coverage but also pull in dev/test/lint tooling; tighten or broaden in a follow-up if the FOSSA dashboard view warrants it. JIRA: TRIVIAL risk: nonprod
1 parent 88138a3 commit e3524c5

2 files changed

Lines changed: 62 additions & 9 deletions

File tree

.fossa.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,17 @@ project:
77
telemetry:
88
scope: 'off'
99

10-
# We need to specify it per-each package. See fossa_* branches.
11-
# targets:
12-
# only:
13-
# - type: pipenv
14-
# path: path-here
15-
#
16-
# paths:
17-
# only:
18-
# - path-here
10+
# Scope the scan to the published gooddata-* workspace packages + the
11+
# generated gooddata-api-client. Each pyproject.toml is scanned independently
12+
# (FOSSA's pdm strategy reports declared deps); the gooddata-api-client setup.py
13+
# is read by setuptools. Internal helpers (tests-support, scripts) are excluded.
14+
paths:
15+
only:
16+
- packages/gooddata-sdk
17+
- packages/gooddata-pandas
18+
- packages/gooddata-dbt
19+
- packages/gooddata-fdw
20+
- packages/gooddata-flight-server
21+
- packages/gooddata-flexconnect
22+
- packages/gooddata-pipelines
23+
- gooddata-api-client

.github/workflows/fossa.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# (C) 2026 GoodData Corporation
2+
name: FOSSA scan
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
branch:
8+
description: Branch label to attach to the FOSSA scan (defaults to the dispatched ref).
9+
required: false
10+
default: ""
11+
12+
concurrency:
13+
group: fossa-${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
fossa:
18+
name: FOSSA scan
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
steps:
23+
- name: Checkout the code
24+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Check that .fossa.yml exists
29+
shell: bash
30+
run: |
31+
[ -f ./.fossa.yml ] || { echo "Missing .fossa.yml in repo root; FOSSA needs it for project id." >&2; exit 1; }
32+
33+
- name: Workaround for "no targets found" error
34+
shell: bash
35+
run: |
36+
[ -f ./requirements.txt ] || touch ./requirements.txt
37+
38+
- name: Run FOSSA analyze
39+
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0
40+
with:
41+
api-key: ${{ secrets.FOSSA_API_KEY }}
42+
branch: ${{ inputs.branch != '' && inputs.branch || github.ref_name }}
43+
44+
- name: Run FOSSA test (policy gate)
45+
uses: fossas/fossa-action@ff70fe9fe17cbd2040648f1c45e8ec4e4884dcf3 # v1.9.0
46+
with:
47+
api-key: ${{ secrets.FOSSA_API_KEY }}
48+
run-tests: true

0 commit comments

Comments
 (0)