Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/ort.yml
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
Comment on lines +45 to +47

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: write permission 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:

Suggested change
permissions:
contents: read
security-events: write
permissions:
contents: read


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/
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actions/upload-artifact does not reliably expand ~ (tilde) in path, so this may end up looking for a literal ~/.ort/ort-results/ directory and upload nothing (only warning due to if-no-files-found: warn). Prefer copying the ORT results into the workspace and uploading a relative path, or use a GitHub expression that resolves to an absolute path (not shell expansion).

Suggested change
path: ~/.ort/ort-results/
path: ${{ env.HOME }}/.ort/ort-results/

Copilot uses AI. Check for mistakes.
if-no-files-found: warn
Loading