mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Bumps the actions-core group with 2 updates: [actions/setup-go](https://github.com/actions/setup-go) and [actions/cache](https://github.com/actions/cache). Updates `actions/setup-go` from 6.4.0 to 6.5.0 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/4a3601121dd01d1626a1e23e37211e3254c1c06c...924ae3a1cded613372ab5595356fb5720e22ba16) Updates `actions/cache` from 5.0.5 to 6.1.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/27d5ce7f107fe9357f9df03efb73ab90386fccae...55cc8345863c7cc4c66a329aec7e433d2d1c52a9) --- updated-dependencies: - dependency-name: actions/setup-go dependency-version: 6.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions-core - dependency-name: actions/cache dependency-version: 6.1.0 dependency-type: direct:production update-type: version-update:semver-major dependency-group: actions-core ... Signed-off-by: dependabot[bot] <support@github.com>
138 lines
4.1 KiB
YAML
138 lines
4.1 KiB
YAML
name: Security
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
schedule:
|
|
# Run security scans daily at 2 AM UTC
|
|
- cron: '0 2 * * *'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
vulnerability-scan:
|
|
name: Vulnerability Scan
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Install libpcap
|
|
run: sudo apt-get install -y libpcap-dev
|
|
|
|
- name: Install govulncheck
|
|
run: go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
|
|
- name: Run govulncheck (Official Go vulnerability scanner)
|
|
run: |
|
|
echo "::group::Running govulncheck"
|
|
govulncheck ./...
|
|
echo "::endgroup::"
|
|
|
|
static-analysis:
|
|
name: Static Security Analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: Install libpcap
|
|
run: sudo apt-get install -y libpcap-dev
|
|
|
|
- name: Install static analysis tools
|
|
run: |
|
|
go install honnef.co/go/tools/cmd/staticcheck@latest
|
|
|
|
- name: Run staticcheck security analysis
|
|
run: |
|
|
echo "::group::Running staticcheck"
|
|
staticcheck ./...
|
|
echo "::endgroup::"
|
|
|
|
- name: Run Semgrep security analysis
|
|
uses: semgrep/semgrep-action@713efdd345f3035192eaa63f56867b88e63e4e5d # v1 (no v1.x.y semver tag exists)
|
|
with:
|
|
config: >-
|
|
p/security-audit
|
|
p/secrets
|
|
p/golang
|
|
generateSarif: "1"
|
|
continue-on-error: true
|
|
|
|
- name: Upload Semgrep SARIF results
|
|
if: always()
|
|
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
|
with:
|
|
sarif_file: semgrep.sarif
|
|
continue-on-error: true
|
|
|
|
dependency-review:
|
|
name: Dependency Review
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
if: github.event_name == 'pull_request'
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
|
|
- name: Dependency Review
|
|
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
|
with:
|
|
fail-on-severity: moderate
|
|
allow-ghsas: GHSA-xxxx-xxxx-xxxx # Add specific allowlisted advisories if needed
|
|
deny-licenses: GPL-2.0, LGPL-2.0 # Add licenses to deny if needed
|
|
|
|
security-summary:
|
|
name: Security Summary
|
|
runs-on: ubuntu-latest
|
|
needs: [vulnerability-scan, static-analysis]
|
|
if: always()
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: Security scan summary
|
|
run: |
|
|
echo "## Security Scan Results" >> $GITHUB_STEP_SUMMARY
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
|
|
if [[ "${{ needs.vulnerability-scan.result }}" == "success" ]]; then
|
|
echo "✅ **Vulnerability Scan**: PASSED" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Vulnerability Scan**: FAILED" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
if [[ "${{ needs.static-analysis.result }}" == "success" ]]; then
|
|
echo "✅ **Static Analysis**: PASSED" >> $GITHUB_STEP_SUMMARY
|
|
else
|
|
echo "❌ **Static Analysis**: FAILED" >> $GITHUB_STEP_SUMMARY
|
|
fi
|
|
|
|
echo "" >> $GITHUB_STEP_SUMMARY
|
|
echo "For detailed results, check the individual job logs above." >> $GITHUB_STEP_SUMMARY
|
|
|
|
- name: Fail on security issues
|
|
if: needs.vulnerability-scan.result == 'failure' || needs.static-analysis.result == 'failure'
|
|
run: |
|
|
echo "Security scan detected issues. Please review the results above."
|
|
exit 1
|