-
Notifications
You must be signed in to change notification settings - Fork 2
ci: add Enforce License Compliance workflow #13
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
base: main
Are you sure you want to change the base?
Changes from all 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,11 @@ | ||
| version: 3 | ||
|
|
||
| # FOSSA CLI for getsentry/action-enforce-license-compliance. | ||
| # https://github.com/fossas/fossa-cli/blob/master/docs/references/files/fossa-yml.md | ||
|
|
||
| project: | ||
| id: github.com/codecov/contributing | ||
| url: https://github.com/codecov/contributing | ||
|
|
||
| telemetry: | ||
| scope: "off" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: Enforce License Compliance | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened, ready_for_review] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| enforce-license-compliance: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: 'Enforce License Compliance' | ||
| uses: getsentry/action-enforce-license-compliance@57ba820387a1a9315a46115ee276b2968da51f3d # main | ||
| with: | ||
| fossa_api_key: ${{ secrets.FOSSA_API_KEY }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # FOSSA: setuptools discovery target at repo root (add real deps here if applicable). | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The empty Suggested FixSince the repository contains no Python dependencies, the Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews. |
||
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.
Bug: The workflow will fail for pull requests from forks because
secrets.FOSSA_API_KEYis not available, causing the license compliance check to either fail or be silently skipped.Severity: HIGH
Suggested Fix
Use the
pull_request_targetevent instead ofpull_request. This event runs in the context of the base repository and has access to secrets. Alternatively, add a condition to the step to only run it on non-fork PRs, for example:if: github.event.pull_request.head.repo.full_name == github.repository.Prompt for AI Agent
Did we get this right? 👍 / 👎 to inform future reviews.