forked from MiniMax-AI/minimax-code
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.57 KB
/
Copy pathsecurity.yml
File metadata and controls
45 lines (45 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Release audit
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
source-history-artifact:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- uses: ./.github/actions/setup-gitleaks
- name: Classify change
id: changes
run: node scripts/ci-changes.mjs
- name: Scan complete history and source snapshot
shell: bash
run: |
gitleaks git --redact --config .gitleaks.toml --log-opts=--all
mkdir "$RUNNER_TEMP/source-audit"
git archive HEAD | tar -x -C "$RUNNER_TEMP/source-audit"
gitleaks dir "$RUNNER_TEMP/source-audit" --redact --config .gitleaks.toml
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
if: steps.changes.outputs.docs_only != 'true'
with:
version: 9.12.0
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
if: steps.changes.outputs.docs_only != 'true'
with:
node-version: "22"
cache: pnpm
- run: pnpm install --frozen-lockfile
if: steps.changes.outputs.docs_only != 'true'
- run: pnpm build
if: steps.changes.outputs.docs_only != 'true'
- name: Scan built distribution
if: steps.changes.outputs.docs_only != 'true'
run: gitleaks dir dist --redact --config .gitleaks.toml