Skip to content

Commit

Permalink
Merge pull request #83 from paullockaby/weekly-security-scan
Browse files Browse the repository at this point in the history
feat: enable weekly security scan
  • Loading branch information
plockaby authored Dec 8, 2024
2 parents 6761241 + aecabaa commit 4b63905
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 23 deletions.
File renamed without changes.
5 changes: 5 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
# checks to pass" and then, under "Status checks that are required" click "Add checks" and just type in these:
# - "tests / pre-commit"
# - "tests / test"
# - "security / security"
#
# NOTE: if you had the jobs directly in this file you could just refer to them by the yaml identifier for the job.
# for example, this job is called "tests" so you'd put "tests" as a required "status check". and if you were to take
Expand All @@ -16,3 +17,7 @@ jobs:
tests:
uses: ./.github/workflows/tests.yaml
secrets: inherit

security:
uses: ./.github/workflows/security.yaml
secrets: inherit
4 changes: 4 additions & 0 deletions .github/workflows/release-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
uses: ./.github/workflows/tests.yaml
secrets: inherit

security:
uses: ./.github/workflows/security.yaml
secrets: inherit

bump_version:
runs-on: ubuntu-latest

Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Security Scanning

on:
workflow_call:
schedule:
- cron: "0 2 * * 1"

jobs:
trivy:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Setup trivy
uses: aquasecurity/[email protected]
with:
cache: true
version: latest

- name: Run trivy configuration checks
run: |
trivy config . --config=.trivy.yaml --ignorefile=.trivyignore
- name: Run trivy filesystem checks
run: |
trivy filesystem . --config=.trivy.yaml --ignorefile=.trivyignore --no-progress
23 changes: 0 additions & 23 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,29 +25,6 @@ jobs:
env:
SKIP: no-commit-to-branch

security:
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Setup trivy
uses: aquasecurity/[email protected]
with:
cache: true
version: latest

- name: Run trivy configuration checks
run: |
trivy config . --config=.trivy.yaml --ignorefile=.trivyignore
- name: Run trivy filesystem checks
run: |
trivy filesystem . --config=.trivy.yaml --ignorefile=.trivyignore --no-progress
test:
runs-on: ubuntu-latest

Expand Down

0 comments on commit 4b63905

Please sign in to comment.