mirror of
https://github.com/BradGroux/veritas-kanban.git
synced 2026-08-28 02:44:59 +00:00
65 lines
2.1 KiB
YAML
65 lines
2.1 KiB
YAML
name: Security Gates
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '17 9 * * 3'
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
codeql:
|
|
name: CodeQL
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
security-events: write
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
|
with:
|
|
languages: javascript-typescript
|
|
build-mode: none
|
|
queries: security-extended
|
|
- name: Analyze JavaScript and TypeScript
|
|
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4.37.8
|
|
with:
|
|
category: '/language:javascript-typescript'
|
|
|
|
gitleaks:
|
|
name: Gitleaks
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
GITLEAKS_VERSION: 8.30.1
|
|
GITLEAKS_LINUX_X64_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
- uses: pnpm/action-setup@0977fd99725f1db4007ccb2928dbb4e90d06cc86 # v6.0.10
|
|
- name: Download verified gitleaks release
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
archive="$RUNNER_TEMP/gitleaks.tar.gz"
|
|
curl --fail --silent --show-error --location \
|
|
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" \
|
|
--output "$archive"
|
|
echo "${GITLEAKS_LINUX_X64_SHA256} ${archive}" | sha256sum --check --status
|
|
tar -xzf "$archive" -C "$RUNNER_TEMP" gitleaks
|
|
- name: Guard security workflow policy
|
|
run: pnpm check:security-gates
|
|
- name: Scan reviewed tree and test detection
|
|
env:
|
|
GITLEAKS_BIN: ${{ runner.temp }}/gitleaks
|
|
run: pnpm check:gitleaks
|