Skip to content

Commit

Permalink
ci(security): apply best practices by step security (#8)
Browse files Browse the repository at this point in the history
* [StepSecurity] Apply security best practices

Signed-off-by: StepSecurity Bot <[email protected]>

* Update and rename dependency-review.yml to deps-review.yml

* Update deps-renovate.yaml

---------

Signed-off-by: StepSecurity Bot <[email protected]>
Co-authored-by: Ahmed AbouZaid <[email protected]>
  • Loading branch information
step-security-bot and aabouzaid committed Sep 12, 2023
1 parent 344b358 commit 9e78ebf
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/deps-renovate.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Deps - Renovate
name: Dependency - Renovate

on:
pull_request:
paths:
- '.github/renovate.json5'
workflow_dispatch: { }

permissions:
contents: read

jobs:
check:
name: Check renovate config
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/deps-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,
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
# 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
on: [pull_request]

permissions:
contents: read

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: 'Dependency Review'
uses: actions/dependency-review-action@0efb1d1d84fc9633afcdaad14c485cbbc90ef46c # v2.5.1
3 changes: 3 additions & 0 deletions .github/workflows/sec-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- cron: '11 0 * * 5'
workflow_dispatch:

permissions:
contents: read

jobs:
analyze:
name: Analyze Code
Expand Down
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.16.3
hooks:
- id: gitleaks
- repo: https://github.com/golangci/golangci-lint
rev: v1.52.2
hooks:
- id: golangci-lint
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace

0 comments on commit 9e78ebf

Please sign in to comment.