File tree Expand file tree Collapse file tree 3 files changed +96
-1
lines changed Expand file tree Collapse file tree 3 files changed +96
-1
lines changed Original file line number Diff line number Diff line change 1- ac9dac019eeafc3a1791bd564cbd8d1455f2a6e9
1+ c1d7918d3c48ebfa217c51ed857a0124e361dad3
Original file line number Diff line number Diff line change 1+ # Upstream https://github.com/ossf/scorecard/blob/main/.github/workflows/scorecard-analysis.yml
2+ # Tweaked to not pin actions by SHA digest as I think that's overkill noisy security theater.
3+ name : OpenSSF Scorecard analysis
4+ on :
5+ push :
6+ branches :
7+ - main
8+
9+ permissions : read-all
10+
11+ jobs :
12+ analysis :
13+ name : Scorecard analysis
14+ runs-on : ubuntu-24.04
15+ permissions :
16+ # Needed for Code scanning upload
17+ security-events : write
18+ # Needed for GitHub OIDC token if publish_results is true
19+ id-token : write
20+
21+ steps :
22+ - name : " Checkout code"
23+ uses : actions/checkout@v4
24+ with :
25+ persist-credentials : false
26+
27+ - name : " Run analysis"
28+ uses : ossf/scorecard-action@v2.4.3
29+ with :
30+ results_file : results.sarif
31+ results_format : sarif
32+ # Scorecard team runs a weekly scan of public GitHub repos,
33+ # see https://github.com/ossf/scorecard#public-data.
34+ # Setting `publish_results: true` helps us scale by leveraging your workflow to
35+ # extract the results instead of relying on our own infrastructure to run scans.
36+ # And it's free for you!
37+ publish_results : true
38+
39+ - name : " Upload artifact"
40+ uses : actions/upload-artifact@v4
41+ with :
42+ name : SARIF file
43+ path : results.sarif
44+ retention-days : 5
45+
46+ - name : " Upload to code-scanning"
47+ uses : github/codeql-action/upload-sarif@v4
48+ with :
49+ sarif_file : results.sarif
50+
Original file line number Diff line number Diff line change 1+ name : Automatic Rebase
2+ on :
3+ pull_request :
4+ types : [labeled]
5+
6+ permissions :
7+ contents : read
8+
9+ jobs :
10+ rebase :
11+ name : Rebase
12+ if : github.event.label.name == 'needs-rebase'
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Generate Actions Token
16+ id : token
17+ uses : actions/create-github-app-token@v2
18+ with :
19+ app-id : ${{ secrets.APP_ID }}
20+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
21+ owner : ${{ github.repository_owner }}
22+
23+ - name : Checkout
24+ uses : actions/checkout@v5
25+ with :
26+ token : ${{ steps.token.outputs.token }}
27+ fetch-depth : 0
28+
29+ - name : Automatic Rebase
30+ uses : peter-evans/rebase@v3
31+ with :
32+ token : ${{ steps.token.outputs.token }}
33+
34+ - name : Remove needs-rebase label
35+ if : always()
36+ uses : actions/github-script@v8
37+ with :
38+ github-token : ${{ steps.token.outputs.token }}
39+ script : |
40+ await github.rest.issues.removeLabel({
41+ owner: context.repo.owner,
42+ repo: context.repo.repo,
43+ issue_number: context.issue.number,
44+ name: 'needs-rebase'
45+ });
You can’t perform that action at this time.
0 commit comments