fix(ci): monorepo workflow paths and Bun setup #3
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-secrets | ||
|
Check failure on line 1 in .github/workflows/apps-docs-security-secrets.yml
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| paths: | ||
| - "apps/docs/**" | ||
| - ".github/workflows/apps-docs-security-secrets.yml" | ||
| pull_request: | ||
| paths: | ||
| - "apps/docs/**" | ||
| - ".github/workflows/apps-docs-security-secrets.yml" | ||
| schedule: | ||
| - cron: "17 6 * * 1" | ||
| concurrency: | ||
| group: apps-docs-security-secrets-security-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| permissions: | ||
| contents: read | ||
| security-events: write | ||
| pull-requests: read | ||
| jobs: | ||
| gitleaks: | ||
| name: gitleaks secret scan | ||
| defaults: | ||
| run: | ||
| working-directory: apps/docs | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| env: | ||
| GITLEAKS_VERSION: "8.30.1" | ||
| GITLEAKS_SHA256: "551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb" | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| # Full history so gitleaks can scan every commit. | ||
| fetch-depth: 0 | ||
| - name: Install gitleaks CLI | ||
| run: | | ||
| set -euo pipefail | ||
| TARBALL="gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" | ||
| curl -sSL -o "/tmp/${TARBALL}" \ | ||
| "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${TARBALL}" | ||
| echo "${GITLEAKS_SHA256} /tmp/${TARBALL}" | sha256sum -c - | ||
| tar -xzf "/tmp/${TARBALL}" -C /tmp | ||
| sudo mv /tmp/gitleaks /usr/local/bin/ | ||
| gitleaks version | ||
| - name: Scan | ||
| working-directory: ${{ github.workspace }} | ||
| run: | | ||
| gitleaks detect \ | ||
| --source . \ | ||
| --config apps/api/.gitleaks.toml \ | ||
| --no-banner \ | ||
| --redact \ | ||
| --verbose \ | ||
| --report-format=sarif \ | ||
| --report-path=gitleaks-results.sarif \ | ||
| --exit-code=1 | ||
| - name: Upload SARIF | ||
| if: always() | ||
| working-directory: ${{ github.workspace }} | ||
| uses: github/codeql-action/upload-sarif@7c1e4cf0b20d7c1872b26569c00ba908797a59bf # v4 | ||
| with: | ||
| sarif_file: gitleaks-results.sarif | ||
| category: gitleaks | ||
| continue-on-error: true | ||