Skip to content

Commit ab2384e

Browse files
authored
CI: Improve Security Posture (#356)
1 parent 9ac15cc commit ab2384e

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches:
77
- main
88

9+
permissions: {}
10+
911
jobs:
1012
test-truffleruby:
1113
strategy:
@@ -26,8 +28,10 @@ jobs:
2628
TRUFFLERUBYOPT: "--jvm --polyglot"
2729

2830
steps:
29-
- uses: actions/checkout@v4
30-
- uses: ruby/setup-ruby@v1
31+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
with:
33+
persist-credentials: false
34+
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1
3135
with:
3236
ruby-version: ${{ matrix.ruby }}
3337
bundler: latest # to get this fix: https://github.com/rubygems/rubygems/issues/6165
@@ -64,8 +68,10 @@ jobs:
6468
runs-on: ${{ matrix.os }}
6569

6670
steps:
67-
- uses: actions/checkout@v4
68-
- uses: ruby/setup-ruby@v1
71+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
72+
with:
73+
persist-credentials: false
74+
- uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 # v1
6975
with:
7076
ruby-version: ${{ matrix.ruby }}
7177
bundler-cache: true
@@ -120,7 +126,9 @@ jobs:
120126
if: ${{ matrix.libc == 'musl' }}
121127
run: docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} apk add --no-cache build-base bash git
122128
- name: Checkout
123-
uses: actions/checkout@v4
129+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
130+
with:
131+
persist-credentials: false
124132
- name: Update Rubygems
125133
run: docker exec -w "${PWD}" ${{ steps.container.outputs.container_id }} gem update --system
126134
- name: Bundle

0 commit comments

Comments
 (0)