Skip to content

ci: add post-merge SCANOSS license & BOM check - #1184

Open
arav-agarwal2 wants to merge 2 commits into
mlcommons:masterfrom
arav-agarwal2:feat/scanoss
Open

arav-agarwal2 wants to merge 2 commits into
mlcommons:masterfrom
arav-agarwal2:feat/scanoss

Conversation

@arav-agarwal2

@arav-agarwal2 arav-agarwal2 commented Sep 29, 2026 •

Copy link
Copy Markdown

Hello folks! As part of AI-code policy changes at MLC, we're trying to role out AI-generated code checks to catch if licensed code from bad licenses end up in the codebase.

This PR adds a SCANOSS license & BOM check that runs after merge to master (and on manual dispatch). It's informational only and never blocks.

  • .github/workflows/scanoss.yml: scans only the files changed in the pushed range (before..sha), not the whole tree, using scanoss-py against api.osskb.org. It then:
    • converts the results to a CycloneDX BOM
    • runs the copyleft and undeclared-component inspections (these steps use continue-on-error)
    • writes a report to the run's Summary: a file → component / match % / license table that flags copyleft, non-commercial, or non-permissive licenses, plus the remaining per-key osskb quota when SCANOSS_API_KEY is set
    • uploads everything in scanoss-reports/ as an artifact that's kept for 30 days
  • .github/scanoss.json: scan settings that skip tests, vendored and third-party dirs, node_modules, and generated protobuf files, and declare pkg:github/mlcommons/mobile_app_open in the BOM.

Once this is merged, I'll need to add a SCANOSS_API_KEY repo secret so the system doesn't hit rate limits, so please add me to the repo so I can add that information accordingly if possible.

@arav-agarwal2
arav-agarwal2 requested review from a team and anhappdev as code owners September 29, 2026 16:24
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@freedomtan

Copy link
Copy Markdown
Contributor

@anhappdev please take care of this.

@anhappdev anhappdev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. For setting the SCANOSS_API_KEY please contact @mlcommons/admin

@anhappdev anhappdev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@arav-agarwal2 Please pin any Github actions to commit SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants