Skip to content

Merge pull request #87 from PostHog/dependabot/github_actions/github-… #199

Merge pull request #87 from PostHog/dependabot/github_actions/github-…

Merge pull request #87 from PostHog/dependabot/github_actions/github-… #199

Workflow file for this run

# Security scanning workflow

Check failure on line 1 in .github/workflows/security.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/security.yml

Invalid workflow file

(Line: 60, Col: 9): Unexpected value 'working-directory'
name: Security
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# Run weekly on Monday at 00:00 UTC
- cron: "0 0 * * 1"
permissions:
contents: read
security-events: write
jobs:
# Dependency vulnerability scanning
govulncheck:
name: Go Vulnerability Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
cache: true
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run govulncheck
run: |
govulncheck ./...
cd tools && govulncheck ./...
# Static analysis with gosec
gosec:
name: Security Scan (gosec)
permissions:
security-events: write
actions: read
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: securego/gosec@4a3bd8af174872c778439083ded7adbf3747e770 # v2.26.1
with:
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out results.sarif ./...'
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@c8a3492b26b5832fc3d057acc04ba1fc93ff536a # v2.23.6
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
- name: Run gosec on tools
uses: securego/gosec@4a3bd8af174872c778439083ded7adbf3747e770 # v2.26.1
with:
args: '-no-fail -fmt sarif -out results-tools.sarif ./...'
working-directory: tools
- name: Upload SARIF file for tools
uses: github/codeql-action/upload-sarif@c8a3492b26b5832fc3d057acc04ba1fc93ff536a # v2.23.6
with:
sarif_file: tools/results-tools.sarif
category: tools
# Dependency review for PRs
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: high