Skip to content

Commit

Permalink
.github: workflows: restrict top-level workflow permissions
Browse files Browse the repository at this point in the history
Only permit reading the repository contents by default, and set further
privileges at the job level to satisfy OpenSSF Scorecard criteria.

Link: https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
Link: https://securityscorecards.dev/viewer/?uri=github.com/OFS/opae-sdk
Signed-off-by: Peter Colberg <peter.colberg@intel.com>
  • Loading branch information
pcolberg committed Sep 18, 2024
1 parent 4eaf030 commit cd83d2b
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-debs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build DEBs

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
push:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-rpms.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Build RPMs

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
push:
branches:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ccpp-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: C/C++ CI Build and Test

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
workflow_dispatch:
push:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker-rpm.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Docker Build and Review RPM

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
push:
branches-ignore:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/no-ccpp-tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: C/C++ CI Build and Test (dummy)

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
workflow_dispatch:
push:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/no-python-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: python static analysis (dummy)

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
workflow_dispatch:
push:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pacsign.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Python pacsign tests

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
pull_request:
paths:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/python-static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: python static analysis

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
pull_request:
branches:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: valgrind OPAE tests

# https://github.com/ossf/scorecard/blob/9ff40de429d0c7710076070387c8755494a9f187/docs/checks.md#token-permissions
permissions:
contents: read

on:
schedule:
Expand Down

0 comments on commit cd83d2b

Please sign in to comment.