-
Notifications
You must be signed in to change notification settings - Fork 0
ci: add ORT (OSS Review Toolkit) workflow suite #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,77 @@ | ||||||
| # ORT (OSS Review Toolkit) — dependency analysis, license compliance, and SBOM generation. | ||||||
| # | ||||||
| # Runs the full ORT pipeline: | ||||||
| # 1. Analyzer — builds the dependency graph for all Python (pip/PyPI) packages | ||||||
| # 2. Advisor — queries OSV for known CVEs/vulnerabilities in those packages | ||||||
| # 3. Reporter — generates CycloneDX (JSON + XML), SPDX (JSON + YAML), and | ||||||
| # an interactive WebApp report | ||||||
| # 4. Upload — stores all ORT results as GitHub Actions workflow artifacts | ||||||
| # | ||||||
| # ORT complements pip-audit (which also uses OSV) by additionally producing | ||||||
| # standard SBOM formats consumed by downstream supply-chain tooling, and by | ||||||
| # running the full policy-evaluation pipeline via its Evaluator. | ||||||
| # | ||||||
| # Audit notes (2026-03-11): | ||||||
| # - ort-ci-github-action is pinned to a specific commit SHA (no stable | ||||||
| # releases published); comment shows branch it was taken from. | ||||||
| # - allow-dynamic-versions: 'true' is required because requirements.txt | ||||||
| # does not use a lock-file and several entries lack pinned versions. | ||||||
| # - The 'evaluator' step is intentionally omitted (requires a custom | ||||||
| # policy rules file in an ort-config repo). Re-add once policy rules | ||||||
| # are authored. | ||||||
| # - fail-on is left empty so findings are informational; upgrade to | ||||||
| # 'issues' or 'violations' once a baseline is established. | ||||||
| # - results are uploaded twice: once by ORT's own upload-results step | ||||||
| # (standard ORT artifact naming) and once by actions/upload-artifact | ||||||
| # for easy download from the workflow summary page. | ||||||
| # - Sunday 01:00 UTC schedule avoids overlap with other weekly scans. | ||||||
|
|
||||||
| name: ORT | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: [ "main" ] | ||||||
| pull_request: | ||||||
| branches: [ "main" ] | ||||||
| schedule: | ||||||
| - cron: "0 1 * * 0" # Every Sunday at 01:00 UTC | ||||||
|
|
||||||
| permissions: {} # Reset all — least-privilege baseline | ||||||
|
|
||||||
| jobs: | ||||||
| ort: | ||||||
| name: Analyze, advise and generate SBOMs | ||||||
| runs-on: ubuntu-latest | ||||||
| permissions: | ||||||
| contents: read | ||||||
| security-events: write | ||||||
|
|
||||||
| steps: | ||||||
| - name: Use HTTPS instead of SSH for Git cloning | ||||||
| run: git config --global url.https://github.com/.insteadOf ssh://git@github.com/ | ||||||
|
|
||||||
| - name: Checkout repository | ||||||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||||||
|
|
||||||
| - name: Run ORT | ||||||
| uses: oss-review-toolkit/ort-ci-github-action@62e59b4b372de061b0347660971ec35bb013e1d5 # main | ||||||
| with: | ||||||
| allow-dynamic-versions: 'true' | ||||||
| advisors: 'OSV' | ||||||
| fail-on: '' | ||||||
| report-formats: 'CycloneDx,SpdxDocument,WebApp' | ||||||
| ort-cli-args: '-P ort.forceOverwrite=true --stacktrace' | ||||||
| run: > | ||||||
| cache-dependencies, | ||||||
| analyzer, | ||||||
| advisor, | ||||||
| reporter, | ||||||
| upload-results | ||||||
|
|
||||||
| - name: Upload ORT results | ||||||
| if: always() | ||||||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||||||
| with: | ||||||
| name: ort-results | ||||||
| path: ~/.ort/ort-results/ | ||||||
|
||||||
| path: ~/.ort/ort-results/ | |
| path: ${{ env.HOME }}/.ort/ort-results/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚪ LOW RISK
The
security-events: writepermission is currently unused as the workflow is not configured to generate or upload SARIF reports. To maintain a least-privilege baseline, this permission should be removed.This might be a simple fix: