Skip to content

Commit e3ed170

Browse files
[StepSecurity] Apply security best practices
Signed-off-by: StepSecurity Bot <[email protected]>
1 parent 387ff1a commit e3ed170

8 files changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/devskim.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ concurrency:
1717
group: devskim-${{ github.ref }}
1818
cancel-in-progress: false
1919

20+
permissions:
21+
contents: read
22+
2023
jobs:
2124
lint:
2225
name: DevSkim

.github/workflows/git-sizer-dispatch.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ jobs:
1313
name: git-sizer - ${{ github.event.inputs.repo }}
1414
runs-on: ubuntu-latest
1515
steps:
16+
- name: Harden the runner (Audit all outbound calls)
17+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
18+
with:
19+
egress-policy: audit
20+
1621
- name: Checkout code
1722
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1823

1924
- name: Use local git-sizer action
2025
id: sizer
21-
uses: ChrisCarini/github-git-sizer-action@latest
26+
uses: ChrisCarini/github-git-sizer-action@09eaa4ae73038a5f0bbdc7e7b964f1bf6114c277 # latest
2227
with:
2328
repo: ${{ github.event.inputs.repo }}
2429
flags: '--threshold=0'

.github/workflows/git-sizer.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ jobs:
1212
name: git-sizer - ${{ github.repository }}
1313
runs-on: ubuntu-latest
1414
steps:
15+
- name: Harden the runner (Audit all outbound calls)
16+
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
17+
with:
18+
egress-policy: audit
19+
1520
- name: Run git-sizer
1621
id: sizer
1722
uses: ChrisCarini/github-git-sizer-action@09eaa4ae73038a5f0bbdc7e7b964f1bf6114c277 # latest

.github/workflows/rebase.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ name: Automatic Rebase
22
on:
33
issue_comment:
44
types: [created]
5+
permissions:
6+
contents: read
7+
58
jobs:
69
rebase:
10+
permissions:
11+
contents: write # for cirrus-actions/rebase to push code to rebase
12+
pull-requests: read # for cirrus-actions/rebase to get info about PR
713
name: Rebase
814
runs-on: ubuntu-latest
915
if: >-

.github/workflows/spelling_action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
concurrency:
99
group: spellcheck-${{ github.ref }}
1010
cancel-in-progress: false
11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
build:
1316
name: Spellcheck

.github/workflows/summary.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
issues:
55
types: [opened]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
summary:
912
runs-on: ubuntu-latest

.github/workflows/trufflehog.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- main
77
pull_request:
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
trufflehog:
1114
runs-on: ubuntu-latest

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ repos:
3333
- id: check-vcs-permalinks
3434
# - id: pretty-format-json
3535
- id: check-docstring-first
36+
- repo: https://github.com/jumanjihouse/pre-commit-hooks
37+
rev: 3.0.0
38+
hooks:
39+
- id: RuboCop

0 commit comments

Comments
 (0)