Repository navigation
76 lines (72 loc) · 2.67 KB
/
Copy pathchecks.yml
File metadata and controls
76 lines (72 loc) · 2.67 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: checks
on:
push:
branches: [main]
pull_request:
# Least privilege: the token can read the repo and nothing else.
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: 22
cache: pnpm
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm check:boundaries
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
env:
NEXT_TELEMETRY_DISABLED: "1"
- name: Verify real sharing metadata and PNG responses
env:
NEXT_TELEMETRY_DISABLED: "1"
TYPESAFE_API_KEY: ""
run: |
pnpm start > "$RUNNER_TEMP/jev-sharing-server.log" 2>&1 &
server_pid=$!
trap 'kill "$server_pid" 2>/dev/null || true' EXIT
node scripts/check-sharing-http.mjs
- name: Retain generated image evidence
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: jev-sharing-evidence
path: test-results/sharing/
if-no-files-found: ignore
retention-days: 14
secrets:
name: secret scan
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Built-in pattern check (no dependencies)
run: node scripts/check-secrets.mjs --all
- name: gitleaks over full history
# The gitleaks GitHub Action needs a paid license for organization repos;
# the binary is MIT. Pin the version and verify the release checksum.
env:
GITLEAKS_VERSION: 8.30.1
run: |
set -euo pipefail
base="https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}"
curl -sSLO "${base}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
curl -sSLO "${base}/gitleaks_${GITLEAKS_VERSION}_checksums.txt"
grep " gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz$" "gitleaks_${GITLEAKS_VERSION}_checksums.txt" | sha256sum -c -
tar -xzf "gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" gitleaks
./gitleaks git --no-banner --redact --exit-code 1 .