Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 943a1d9

Browse files
author
Eoghan Russell
authored
Merge pull request #91 from step-security-bot/stepsecurity_remediation_1684317050
[StepSecurity] Apply security best practices
2 parents 2c157fc + 11a16cf commit 943a1d9

File tree

7 files changed

+95
-14
lines changed

7 files changed

+95
-14
lines changed

Diff for: .github/dependabot.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: docker
9+
directory: /docker/dpdk-app-centos
10+
schedule:
11+
interval: daily
12+
13+
- package-ecosystem: docker
14+
directory: /docker/vpp-centos-userspace-cni
15+
schedule:
16+
interval: daily
17+
18+
- package-ecosystem: gomod
19+
directory: /
20+
schedule:
21+
interval: daily

Diff for: .github/workflows/codeql.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
schedule:
99
- cron: "37 4 * * 0"
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
analyze:
1316
name: Analyze
@@ -23,19 +26,24 @@ jobs:
2326
language: [ go ]
2427

2528
steps:
29+
- name: Harden Runner
30+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
31+
with:
32+
egress-policy: audit
33+
2634
- name: Checkout
27-
uses: actions/checkout@v3
35+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
2836

2937
- name: Initialize CodeQL
30-
uses: github/codeql-action/init@v2
38+
uses: github/codeql-action/init@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
3139
with:
3240
languages: ${{ matrix.language }}
3341
queries: +security-and-quality
3442

3543
- name: Autobuild
36-
uses: github/codeql-action/autobuild@v2
44+
uses: github/codeql-action/autobuild@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
3745

3846
- name: Perform CodeQL Analysis
39-
uses: github/codeql-action/analyze@v2
47+
uses: github/codeql-action/analyze@29b1f65c5e92e24fe6b6647da1eaabe529cec70f # v2.3.3
4048
with:
4149
category: "/language:${{ matrix.language }}"

Diff for: .github/workflows/dependency-review.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Harden Runner
20+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
21+
with:
22+
egress-policy: audit
23+
24+
- name: 'Checkout Repository'
25+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
26+
- name: 'Dependency Review'
27+
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1

Diff for: .github/workflows/scorecard.yml

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
# actions: read
3232

3333
steps:
34+
- name: Harden Runner
35+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
36+
with:
37+
egress-policy: audit
38+
3439
- name: "Checkout code"
3540
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
3641
with:

Diff for: .github/workflows/static-scan.yml

+28-8
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,14 @@ jobs:
66
name: Lint
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- name: Harden Runner
10+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
11+
with:
12+
egress-policy: audit
13+
14+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
1015
- name: golangci-lint
11-
uses: golangci/golangci-lint-action@v2
16+
uses: golangci/golangci-lint-action@5c56cd6c9dc07901af25baab6f2b0d9f3b7c3018 # v2.5.2
1217
with:
1318
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
1419
version: v1.52.2
@@ -17,26 +22,41 @@ jobs:
1722
name: Shellcheck
1823
runs-on: ubuntu-latest
1924
steps:
20-
- uses: actions/checkout@v2
25+
- name: Harden Runner
26+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
27+
with:
28+
egress-policy: audit
29+
30+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
2131
- name: Run ShellCheck
22-
uses: ludeeus/action-shellcheck@master
32+
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # master
2333
hadolint:
2434
runs-on: ubuntu-latest
2535
name: Hadolint
2636
steps:
27-
- uses: actions/checkout@v2
28-
- uses: brpaz/[email protected]
37+
- name: Harden Runner
38+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
39+
with:
40+
egress-policy: audit
41+
42+
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
43+
- uses: brpaz/hadolint-action@7e374b112fd3e7e6ea346131c40e17c7254f64bf # v1.2.1
2944
name: Run Hadolint
3045
with:
3146
dockerfile: Dockerfile
3247

3348
go-check:
3449
runs-on: ubuntu-latest
3550
steps:
36-
- uses: actions/checkout@v3
51+
- name: Harden Runner
52+
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
53+
with:
54+
egress-policy: audit
55+
56+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
3757

3858
- name: Set up Go
39-
uses: actions/setup-go@v3
59+
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
4060
with:
4161
go-version: 1.18.x
4262

Diff for: docker/dpdk-app-centos/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
# -------- Builder stage.
7-
FROM centos:7
7+
FROM centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
88

99
#
1010
# Install required packages

Diff for: docker/vpp-centos-userspace-cni/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
# -------- Builder stage.
8-
FROM centos:7
8+
FROM centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4
99

1010
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
1111

0 commit comments

Comments
 (0)