Skip to content

Commit

Permalink
[StepSecurity] Apply security best practices (#6)
Browse files Browse the repository at this point in the history
## Security Fixes

### Add Dependency Review Workflow

The Dependency Review Workflow enforces dependency reviews on your pull requests. The action scans for vulnerable versions of dependencies introduced by package version changes in pull requests, and warns you about the associated security vulnerabilities. This gives you better visibility of what's changing in a pull request, and helps prevent vulnerabilities being added to your repository.

- [Github Guide about Dependency Review](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)
- [Github Guide for Configuring Dependency Review Action](https://docs.github.com/en/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-dependency-review#using-inline-configuration-to-set-up-the-dependency-review-action)
  • Loading branch information
step-security-bot authored Jan 23, 2025
1 parent 9a68d89 commit ddc4d97
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependency Review Action
#
# This Action will scan dependency manifest files that change as part of a Pull Request,

Check failure on line 3 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

3:81 [line-length] line too long (88 > 80 characters)
# surfacing known-vulnerable versions of the packages declared or updated in the PR.

Check failure on line 4 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

4:81 [line-length] line too long (84 > 80 characters)
# Once installed, if the workflow run is marked as required,
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'

Check warning on line 9 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

9:1 [document-start] missing document start "---"

Check failure on line 9 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

9:7 [quoted-strings] string value is redundantly quoted with any quotes
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner

Check failure on line 19 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

19:7 [indentation] wrong indentation: expected 4 but found 6
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.4

Check warning on line 20 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

20:84 [comments] too few spaces before comment

Check failure on line 20 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

20:81 [line-length] line too long (92 > 80 characters)
with:
egress-policy: audit

- name: 'Checkout Repository'

Check failure on line 24 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

24:15 [quoted-strings] string value is redundantly quoted with any quotes
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Check warning on line 25 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

25:73 [comments] too few spaces before comment
- name: 'Dependency Review'

Check failure on line 26 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

26:15 [quoted-strings] string value is redundantly quoted with any quotes
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4.5.0

Check warning on line 27 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

27:89 [comments] too few spaces before comment

Check failure on line 27 in .github/workflows/dependency-review.yml

View workflow job for this annotation

GitHub Actions / 🧹 Linters / pre-commit@🐍3.13@ubuntu-latest

27:81 [line-length] line too long (96 > 80 characters)

0 comments on commit ddc4d97

Please sign in to comment.