Skip to content

Commit 4373a3d

Browse files
[StepSecurity] Apply security best practices (#111)
* [StepSecurity] Apply security best practices Signed-off-by: StepSecurity Bot <[email protected]> * Delete .github/workflows/codeql.yml --------- Signed-off-by: StepSecurity Bot <[email protected]> Co-authored-by: Fabian Zeindl <[email protected]>
1 parent 4b2342d commit 4373a3d

File tree

5 files changed

+61
-2
lines changed

5 files changed

+61
-2
lines changed

Diff for: .github/dependabot.yml

+5
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@ updates:
99
directory: "/" # Location of package manifests
1010
schedule:
1111
interval: "weekly"
12+
13+
- package-ecosystem: github-actions
14+
directory: /
15+
schedule:
16+
interval: daily

Diff for: .github/workflows/build-push-pr-master.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
branches:
88
- master
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
build:
1215
name: Build push and pullrequest on master
@@ -15,9 +18,14 @@ jobs:
1518
matrix:
1619
node-version: [18.x, 20.x]
1720
steps:
18-
- uses: actions/checkout@v3
21+
- name: Harden Runner
22+
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
23+
with:
24+
egress-policy: audit
25+
26+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
1927
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
2129
with:
2230
node-version: ${{ matrix.node-version }}
2331
- run: npm ci

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@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
21+
with:
22+
egress-policy: audit
23+
24+
- name: 'Checkout Repository'
25+
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
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@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
36+
with:
37+
egress-policy: audit
38+
3439
- name: "Checkout code"
3540
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3641
with:

Diff for: .pre-commit-config.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
repos:
2+
- repo: https://github.com/gitleaks/gitleaks
3+
rev: v8.16.3
4+
hooks:
5+
- id: gitleaks
6+
- repo: https://github.com/pre-commit/mirrors-eslint
7+
rev: v8.38.0
8+
hooks:
9+
- id: eslint
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.4.0
12+
hooks:
13+
- id: end-of-file-fixer
14+
- id: trailing-whitespace

0 commit comments

Comments
 (0)