Skip to content

Commit 6caa8b0

Browse files
authored
Merge pull request #2 from xbow-engineering/chore/GHA-061155-stepsecurity-remediation
CI/CD Security Improvements with Step Security
2 parents 83cb54e + 159f686 commit 6caa8b0

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

.github/workflows/test.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,20 @@ on:
44
pull_request:
55
push:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
test:
912
runs-on: ubuntu-latest
1013
steps:
14+
- name: Harden the runner (Audit all outbound calls)
15+
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
16+
with:
17+
egress-policy: audit
18+
1119
-
12-
uses: actions/checkout@v2
20+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1321
-
1422
name: Install shfmt
1523
run: sudo snap install shfmt
@@ -18,7 +26,7 @@ jobs:
1826
run: shfmt -d entrypoint.sh
1927
-
2028
name: Install Python
21-
uses: actions/setup-python@v2
29+
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
2230
with:
2331
python-version: '3.x'
2432
cache: 'pip'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Dockerfile used as GitHub action
2-
FROM python:latest AS base
2+
FROM python:latest@sha256:6d58c1a9444bc2664f0fa20c43a592fcdb2698eb9a9c32257516538a2746c19a AS base
33

44
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
55
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \

0 commit comments

Comments
 (0)