Skip to content

Commit a07c4d9

Browse files
committed
chore: add OSSF scorecard github action and README badge
Relates to github/github-ospo#84 Relates to github/github-ospo#95 - [x] setup OSSF scorecard github action - [x] setup OSSF scorecard readme badge - [x] change current GitHub Actions to use SHAs instead of tags Signed-off-by: jmeridth <jmeridth@gmail.com>
1 parent fa291c6 commit a07c4d9

File tree

9 files changed

+62
-15
lines changed

9 files changed

+62
-15
lines changed

.github/workflows/auto-labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
name: Auto label pull requests
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: release-drafter/release-drafter@v6
24+
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
with:

.github/workflows/contributors_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
echo "END_DATE=$end_date" >> "$GITHUB_ENV"
3131
3232
- name: Run contributor action
33-
uses: github/contributors@v1
33+
uses: github/contributors@832b6518181710ef277bc9ddafda6696e6b312bd
3434
env:
3535
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3636
START_DATE: ${{ env.START_DATE }}
@@ -39,7 +39,7 @@ jobs:
3939
SPONSOR_INFO: "true"
4040

4141
- name: Create issue
42-
uses: peter-evans/create-issue-from-file@v5
42+
uses: peter-evans/create-issue-from-file@24452a72d85239eacf1468b0f1982a9f3fec4c94
4343
with:
4444
title: Monthly contributor report
4545
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docker-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
1818
- name: Build the Docker image
1919
run: docker build . --file Dockerfile --platform linux/amd64

.github/workflows/major-version-updater.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
contents: write
1616
steps:
1717
- name: Checkout Repo
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
1919

2020
- name: version
2121
id: version

.github/workflows/pr-title.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
name: Validate PR title
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: amannn/action-semantic-pull-request@v5
23+
- uses: amannn/action-semantic-pull-request@e9fabac35e210fea40ca5b14c0da95a099eff26f
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2626
with:

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
contents: write
3434
pull-requests: read
3535
steps:
36-
- uses: release-drafter/release-drafter@v6
36+
- uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348
3737
id: release-drafter
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -55,17 +55,17 @@
5555
IMAGE_NAME: ${{ github.repository }}
5656
steps:
5757
- name: Set up Docker Buildx
58-
uses: docker/setup-buildx-action@v3
58+
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb
5959
- name: Log in to the Container registry
60-
uses: docker/login-action@v3
60+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
6161
with:
6262
registry: ${{ env.REGISTRY }}
6363
username: ${{ github.actor }}
6464
password: ${{ secrets.GITHUB_TOKEN }}
65-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
6666
- name: Push Docker Image
6767
if: ${{ success() }}
68-
uses: docker/build-push-action@v5
68+
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
6969
with:
7070
context: .
7171
file: ./Dockerfile
@@ -84,7 +84,7 @@
8484
discussions: write
8585
steps:
8686
- name: Create an announcement discussion for release
87-
uses: abirismyname/create-discussion@v1.2.0
87+
uses: abirismyname/create-discussion@6e6ef67e5eeb042343ef8b3d8d0f5d545cbdf024
8888
env:
8989
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9090
with:

.github/workflows/scorecard.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Scorecard supply-chain security
3+
on:
4+
workflow_dispatch:
5+
# For Branch-Protection check (for repo branch protection or rules).
6+
# Only the default branch is supported. See
7+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
8+
branch_protection_rule:
9+
# To guarantee Maintained check is occasionally updated. See
10+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
11+
schedule:
12+
- cron: '29 11 * * 6'
13+
push:
14+
branches: ["main"]
15+
16+
permissions: read-all
17+
18+
jobs:
19+
analysis:
20+
name: Merge to Main Scorecard analysis
21+
runs-on: ubuntu-latest
22+
permissions:
23+
security-events: write
24+
id-token: write
25+
26+
steps:
27+
- name: "Checkout code"
28+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Run analysis"
33+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
34+
with:
35+
results_file: results.sarif
36+
results_format: sarif
37+
publish_results: true
38+
- name: "Upload artifact"
39+
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
40+
with:
41+
name: SARIF file
42+
path: results.sarif
43+
retention-days: 5
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
46+
with:
47+
sarif_file: results.sarif

.github/workflows/super-linter.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ jobs:
1818
statuses: write
1919
steps:
2020
- name: Checkout Code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
2222
with:
2323
fetch-depth: 0
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
2727
pip install -r requirements.txt -r requirements-test.txt
2828
- name: Lint Code Base
29-
uses: super-linter/super-linter@v6
29+
uses: super-linter/super-linter@4758be622215d0954c8353ee4877ffd60111cf8e
3030
env:
3131
DEFAULT_BRANCH: main
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Python package](https://github.com/github/contributors/actions/workflows/python-ci.yml/badge.svg)](https://github.com/github/contributors/actions/workflows/python-ci.yml)
44
[![Docker Image CI](https://github.com/github/contributors/actions/workflows/docker-ci.yml/badge.svg)](https://github.com/github/contributors/actions/workflows/docker-ci.yml)
5-
[![CodeQL](https://github.com/github/contributors/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/github/contributors/actions/workflows/github-code-scanning/codeql)
5+
[![CodeQL](https://github.com/github/contributors/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/github/contributors/actions/workflows/github-code-scanning/codeql)[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/github/contributors/badge)](https://scorecard.dev/viewer/?uri=github.com/github/contributors)
66

77
This is a GitHub Action that given an organization or specified repositories, produces information about the [contributors](https://chaoss.community/kb/metric-contributors/) over the specified time period.
88

0 commit comments

Comments
 (0)