-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: created local '.github/workflows/ossf-scorecard.yml' from remo…
…te 'tools/sre_file_sync/ossf-scorecard.yml'
- Loading branch information
1 parent
f5c3604
commit a23b30e
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,47 @@ | ||
name: Scorecards supply-chain security | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
# Weekly on Saturdays. | ||
- cron: "30 1 * * 6" | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecards analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@b2dd2d646c3592c87c4080778d90e24b42eae566 | ||
with: | ||
results_file: ossf-results.json | ||
results_format: json | ||
publish_results: false | ||
|
||
- name: "Add metadata" | ||
run: | | ||
full_repo="${{ github.repository }}" | ||
OWNER=${full_repo%/*} | ||
REPO=${full_repo#*/} | ||
jq -c '. + {"metadata_owner": "'$OWNER'", "metadata_repo": "'$REPO'", "metadata_query": "ossf"}' ossf-results.json > ossf-results-modified.json | ||
- name: "Post results to Sentinel" | ||
uses: cds-snc/sentinel-forward-data-action@main | ||
with: | ||
file_name: ossf-results-modified.json | ||
log_type: GitHubMetadata_OSSF_Scorecard | ||
log_analytics_workspace_id: ${{ secrets.LOG_ANALYTICS_WORKSPACE_ID }} | ||
log_analytics_workspace_key: ${{ secrets.LOG_ANALYTICS_WORKSPACE_KEY }} |