-
Notifications
You must be signed in to change notification settings - Fork 1
ci: adding ossf workflow and osff/codeql badges #10
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Scorecard analysis workflow | ||
on: | ||
push: | ||
# Only the default branch is supported. | ||
branches: | ||
- main | ||
schedule: | ||
# Weekly on Saturdays. | ||
- cron: '30 1 * * 6' | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecard analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed for Code scanning upload | ||
security-events: write | ||
# Needed for GitHub OIDC token if publish_results is true | ||
id-token: write | ||
|
||
steps: | ||
- name: 'Checkout code' | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: 'Run analysis' | ||
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
# Scorecard team runs a weekly scan of public GitHub repos, | ||
# see https://github.com/ossf/scorecard#public-data. | ||
# Setting `publish_results: true` helps us scale by leveraging your workflow to | ||
# extract the results instead of relying on our own infrastructure to run scans. | ||
# And it's free for you! | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable | ||
# uploads of run results in SARIF format to the repository Actions tab. | ||
# https://docs.github.com/en/actions/advanced-guides/storing-workflow-data-as-artifacts | ||
- name: 'Upload artifact' | ||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard (optional). | ||
# Commenting out will disable upload of results to your repo's Code Scanning dashboard | ||
- name: 'Upload to code-scanning' | ||
uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 | ||
with: | ||
sarif_file: results.sarif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Granting 'read-all' repository permissions may be overly broad; consider restricting to only the permissions required by the workflow (e.g., 'security-events' and 'id-token').
Copilot uses AI. Check for mistakes.