Skip to content

Commit 5babd26

Browse files
chore: apply security best practices from step security (#19)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io> Co-authored-by: stepsecurity-app[bot] <188008098+stepsecurity-app[bot]@users.noreply.github.com>
1 parent 78d3b9f commit 5babd26

File tree

8 files changed

+35
-21
lines changed

8 files changed

+35
-21
lines changed

.github/workflows/build-and-quality-checks.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ on:
44
branches: ['master']
55
types: ['opened', 'reopened', 'synchronize']
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
912
name: Code Quality Checks
1013
runs-on: macOS-latest
1114

1215
steps:
1316
- name: Harden the runner (Audit all outbound calls)
14-
uses: step-security/harden-runner@v2
17+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1518
with:
1619
egress-policy: audit
1720

1821
- name: Checkout source branch
19-
uses: actions/checkout@v3
22+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
2023

2124
- name: Install Cocoapods
2225
run: gem install cocoapods

.github/workflows/check-pr-title.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Harden the runner (Audit all outbound calls)
13-
uses: step-security/harden-runner@v2
13+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1414
with:
1515
egress-policy: audit
1616

1717
- name: Checkout source branch
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1919

2020
- name: Check PR title
21-
uses: rudderlabs/github-action-check-pr-title@v1.0.7
21+
uses: rudderlabs/github-action-check-pr-title@29308e12984bdb3f3dcf8dcec3308f4f4652529c # v1.0.7

.github/workflows/deploy-cocoapods.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
build:
912
name: Deploy to Cocoapods
1013
runs-on: macOS-latest
1114
steps:
1215
- name: Harden the runner (Audit all outbound calls)
13-
uses: step-security/harden-runner@v2
16+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1417
with:
1518
egress-policy: audit
1619

1720
- name: Checkout source branch
18-
uses: actions/checkout@v3
21+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1922

2023
- name: Install Cocoapods
2124
run: gem install cocoapods

.github/workflows/draft-new-release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,29 @@ name: Draft new release
33
on:
44
workflow_dispatch
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
draft-new-release:
11+
permissions:
12+
contents: write # for Git to git push
813
name: Draft a new release
914
runs-on: ubuntu-latest
1015
if: startsWith(github.ref, 'refs/heads/fix/') || startsWith(github.ref, 'refs/heads/feature/')
1116
steps:
1217
- name: Harden the runner (Audit all outbound calls)
13-
uses: step-security/harden-runner@v2
18+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1419
with:
1520
egress-policy: audit
1621

1722
- name: Checkout source branch
18-
uses: actions/checkout@v3
23+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1924
with:
2025
fetch-depth: 0
2126

2227
- name: Set Node 16
23-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
2429
with:
2530
node-version: 16
2631

@@ -84,7 +89,7 @@ jobs:
8489
git push --follow-tags
8590
8691
- name: Create pull request into master
87-
uses: repo-sync/pull-request@v2
92+
uses: repo-sync/pull-request@7e79a9f5dc3ad0ce53138f01df2fad14a04831c5 # v2.12.1
8893
with:
8994
source_branch: ${{ steps.create-release.outputs.branch_name }}
9095
destination_branch: 'master'

.github/workflows/manage-github-issue-for-outdated-pods.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
name: Check outdate pods and create issue if it doesn't exist
1212
steps:
1313
- name: Harden the runner (Audit all outbound calls)
14-
uses: step-security/harden-runner@v2
14+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1515
with:
1616
egress-policy: audit
1717

18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1919

2020
- name: Check outdated pods and create issue
2121
id: check-outdated-pods-and-create-issue

.github/workflows/notion-pr-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ jobs:
4848
runs-on: ubuntu-latest
4949
steps:
5050
- name: Harden the runner (Audit all outbound calls)
51-
uses: step-security/harden-runner@v2
51+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
5252
with:
5353
egress-policy: audit
5454

5555
- name: Sync Github PRs to Notion
56-
uses: sivashanmukh/github-notion-pr-sync@1.0.0
56+
uses: sivashanmukh/github-notion-pr-sync@3967330238449a8550b06f6e1d6b83e1af569876 # 1.0.0
5757
with:
5858
notionKey: ${{ secrets.NOTION_BOT_KEY }}
5959
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }}

.github/workflows/publish-new-release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: startsWith(github.event.pull_request.head.ref, 'release/') && github.event.pull_request.merged == true # only merged pull requests must trigger this job
1515
steps:
1616
- name: Harden the runner (Audit all outbound calls)
17-
uses: step-security/harden-runner@v2
17+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1818
with:
1919
egress-policy: audit
2020

@@ -26,12 +26,12 @@ jobs:
2626
echo "release_version=$VERSION" >> $GITHUB_OUTPUT
2727
2828
- name: Checkout source branch
29-
uses: actions/checkout@v3
29+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Set Node 16
34-
uses: actions/setup-node@v3
34+
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
3535
with:
3636
node-version: 16
3737

@@ -45,7 +45,7 @@ jobs:
4545
npx conventional-github-releaser -p angular
4646
4747
- name: Delete release branch
48-
uses: koj-co/delete-merged-action@master
48+
uses: koj-co/delete-merged-action@63a03c35810a8a7d4840d18793c0f68ff8b59450 # master
4949
if: startsWith(github.event.pull_request.head.ref, 'release/')
5050
with:
5151
branches: 'release/*'

.github/workflows/slack-notify.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,22 @@ on:
44
release:
55
types: [created]
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
deploy-tag:
912
name: Notify Slack
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Harden the runner (Audit all outbound calls)
13-
uses: step-security/harden-runner@v2
16+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1417
with:
1518
egress-policy: audit
1619

1720
- name: Send message to Slack channel
1821
id: slack
19-
uses: slackapi/slack-github-action@v1.23.0
22+
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0
2023
env:
2124
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
2225
PROJECT_NAME: 'iOS App Center SDK'

0 commit comments

Comments
 (0)