deps(deps): bump google.golang.org/grpc from 1.83.1 to 1.83.2 #772
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Security | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| schedule: | |
| - cron: '0 0 * * 0' # Weekly on Sundays | |
| permissions: | |
| contents: read | |
| security-events: write # Required for uploading security scan results | |
| jobs: | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create results directory | |
| run: | | |
| mkdir -p scan-results | |
| chmod 777 scan-results | |
| - name: Run Gosec | |
| uses: securego/gosec@master | |
| with: | |
| args: '-no-fail -fmt sarif -out scan-results/gosec.sarif ./...' | |
| - name: Upload Gosec results | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() | |
| with: | |
| sarif_file: scan-results/gosec.sarif | |
| category: GosecScan | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0 | |
| - name: Build image for scanning | |
| uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0 | |
| with: | |
| context: . | |
| load: true | |
| tags: pod-label-webhook:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Run Trivy filesystem scan | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: 'fs' | |
| ignore-unfixed: true | |
| format: 'sarif' | |
| output: 'scan-results/trivy-fs.sarif' | |
| severity: 'CRITICAL,HIGH' | |
| timeout: '10m' | |
| - name: Run Trivy image scan | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: 'pod-label-webhook:latest' | |
| format: 'sarif' | |
| output: 'scan-results/trivy-image.sarif' | |
| severity: 'CRITICAL,HIGH' | |
| timeout: '10m' | |
| - name: Upload Trivy filesystem results | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() | |
| with: | |
| sarif_file: scan-results/trivy-fs.sarif | |
| category: TrivyFSScan | |
| - name: Upload Trivy image results | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() | |
| with: | |
| sarif_file: scan-results/trivy-image.sarif | |
| category: TrivyImageScan | |
| - name: Run container scan | |
| uses: anchore/scan-action@27805bf3b4e84b4a5c980df22ed233c00390a439 # v7.4.2 | |
| id: scan | |
| if: always() | |
| with: | |
| image: "pod-label-webhook:latest" | |
| fail-build: false | |
| severity-cutoff: high | |
| output-format: "sarif" | |
| - name: Upload Anchore scan results | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() | |
| with: | |
| sarif_file: ${{ steps.scan.outputs.sarif }} | |
| - name: Post scan summary | |
| if: always() | |
| run: | | |
| echo "### Security Scan Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "| Scanner | Status |" >> $GITHUB_STEP_SUMMARY | |
| echo "|---------|--------|" >> $GITHUB_STEP_SUMMARY | |
| # Check Gosec results | |
| if [ -f "scan-results/gosec.sarif" ]; then | |
| echo "| Gosec | ✅ Completed |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Gosec | ❌ Failed |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| # Check Trivy results | |
| if [ -f "scan-results/trivy-fs.sarif" ]; then | |
| echo "| Trivy Filesystem | ✅ Completed |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Trivy Filesystem | ❌ Failed |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| if [ -f "scan-results/trivy-image.sarif" ]; then | |
| echo "| Trivy Image | ✅ Completed |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Trivy Image | ❌ Failed |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| # Check Anchore results | |
| if [ -f "scan-results/anchore.sarif" ]; then | |
| echo "| Anchore | ✅ Completed |" >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "| Anchore | ❌ Failed |" >> $GITHUB_STEP_SUMMARY | |
| fi |