DAC Compute integration #315
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 Scans | |
| on: | |
| push: | |
| branches: [ dev, staging, master ] | |
| pull_request: | |
| branches: [ dev, staging, master ] | |
| schedule: | |
| # Run security scans weekly on Monday at 8:00 AM UTC | |
| - cron: '0 8 * * 1' | |
| permissions: | |
| contents: read | |
| security-events: write | |
| actions: read | |
| jobs: | |
| secret-scanning: | |
| name: Secret Scanning | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.11' | |
| - name: Install detect-secrets | |
| run: | | |
| pip install detect-secrets | |
| - name: Run detect-secrets scan | |
| run: | | |
| # Create baseline if it doesn't exist | |
| if [ ! -f .secrets.baseline ]; then | |
| detect-secrets scan --baseline .secrets.baseline | |
| fi | |
| # Run secret detection | |
| detect-secrets scan --baseline .secrets.baseline --force-use-all-plugins | |
| # Audit results with simplified command | |
| detect-secrets audit .secrets.baseline --report | |
| dependency-scanning: | |
| name: Dependency Scanning | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: 1.90.0 | |
| override: true | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Configure Git | |
| run: git config --global url."https://${{ secrets.GH_READ_TOKEN }}:x-oauth-basic@github.com/".insteadOf "https://github.com/" | |
| - name: Check dependency tree for duplicates | |
| run: | | |
| cargo tree --duplicates > dependency-analysis.txt || true | |
| echo "📦 Dependency analysis completed" | |
| - name: Generate dependency report | |
| run: | | |
| echo "# Dependency Security Report" > dependency-report.md | |
| echo "Generated on: $(date)" >> dependency-report.md | |
| echo "" >> dependency-report.md | |
| echo "## Dependency Tree Analysis" >> dependency-report.md | |
| echo '```' >> dependency-report.md | |
| cat dependency-analysis.txt >> dependency-report.md | |
| echo '```' >> dependency-report.md | |
| - name: Upload dependency analysis | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: dependency-analysis | |
| path: | | |
| dependency-analysis.txt | |
| dependency-report.md | |
| code-scanning: | |
| name: CodeQL Analysis | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v3 | |
| with: | |
| languages: 'rust' | |
| config-file: ./.github/codeql/codeql-config.yml | |
| - name: Autobuild | |
| uses: github/codeql-action/autobuild@v3 | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v3 | |
| with: | |
| category: "/language:javascript" |