Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Licence, advisory, ban, and source policy for both Cargo workspaces.
name: cargo-deny

on:
push:
branches: [master]
pull_request:
schedule:
- cron: '33 4 * * 1'

concurrency:
group: cargo-deny-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
cargo-deny:
name: cargo-deny
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@7e38f4b43b4db5c8dd498af069a4f6196df1d067
with:
toolchain: 1.97.1
- uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172
with:
tool: cargo-deny@0.20.2
checksum: true
fallback: none
- name: Check engine workspace
run: cargo deny --manifest-path Cargo.toml check
- name: Check desktop workspace
run: cargo deny --manifest-path apps/desktop/src-tauri/Cargo.toml check
49 changes: 49 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Light CodeQL scan. Source-only (build-mode: none). No custom queries.
name: CodeQL

on:
push:
branches: [master]
pull_request:
schedule:
- cron: '27 4 * * 1'

concurrency:
group: codeql-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
actions: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: actions
build-mode: none
- language: rust
build-mode: none
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Initialize CodeQL
uses: github/codeql-action/init@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: '/language:${{ matrix.language }}'
30 changes: 30 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Reviews dependency changes introduced by a pull request. Existing lockfile
# findings are not a new review failure unless the PR adds or changes them.
name: Dependency review

on:
pull_request:

concurrency:
group: dependency-review-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
dependency-review:
name: Dependency review
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Review dependency changes
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: high
46 changes: 46 additions & 0 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Working-tree secret scan using the committed .gitleaks.toml allowlist.
# Pinned release + checksum rather than gitleaks-action: that action needs a
# GITLEAKS_LICENSE on organization repos, and this job should not take on
# another action dependency to do its work.
name: gitleaks

on:
push:
branches: [master]
pull_request:

concurrency:
group: gitleaks-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
gitleaks:
name: gitleaks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Install gitleaks (pinned + checksummed)
env:
GITLEAKS_VERSION: 8.30.1
GITLEAKS_SHA256: 551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb
run: |
set -euo pipefail
archive="gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
curl --fail --silent --show-error --location --retry 3 --retry-delay 2 \
-o "$archive" \
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/${archive}"
echo "${GITLEAKS_SHA256} ${archive}" | sha256sum --check --strict -
tar -xzf "$archive" gitleaks
install -m 0755 gitleaks /usr/local/bin/gitleaks
rm -f "$archive" gitleaks
gitleaks version
- name: Scan the checkout
run: gitleaks detect --source . --no-git --config .gitleaks.toml --no-banner --redact
41 changes: 41 additions & 0 deletions .github/workflows/osv-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Lockfile vulnerability scan. Does not replace the production advisory gate
# in ci.yml (scripts/security/dependency-advisories.mjs).
name: OSV-Scanner

on:
push:
branches: [master]
pull_request:
schedule:
- cron: '39 4 * * 1'

concurrency:
group: osv-scanner-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
osv-scanner:
name: OSV-Scanner
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: taiki-e/install-action@9983c65e42da123ff25d1f78505eb6de315aa172
with:
tool: osv-scanner@2.6.0
checksum: true
fallback: none
- name: Scan lockfiles
run: >
osv-scanner scan
--lockfile=pnpm-lock.yaml
--lockfile=Cargo.lock
--lockfile=apps/desktop/src-tauri/Cargo.lock
--config=osv-scanner.toml
25 changes: 22 additions & 3 deletions .github/workflows/website-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ jobs:
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
with:
path: apps/website/dist
include-hidden-files: true

# ── 4. Deploy + post-deployment smoke check ───────────────────────────────
deploy:
Expand Down Expand Up @@ -431,12 +432,30 @@ jobs:
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346

# Bounded-retry smoke check against the live URL: homepage, download,
# docs, releases, sitemap, robots, favicons, 404 behaviour and the
# canonical origin (https://varve.studio). A deployment that 404s or
# canonicalizes to the wrong host is a failed deploy.
# docs, releases, sitemap, robots, security.txt, favicons, 404
# behaviour and the canonical origin (https://varve.studio). A
# deployment that 404s or canonicalizes to the wrong host is a failed
# deploy.
- name: Smoke check the live deployment
run: node scripts/website/smoke-pages.mjs "${{ steps.deployment.outputs.page_url }}" --expect-origin https://varve.studio

# upload-pages-artifact drops hidden files unless include-hidden-files
# is set. Fail the deploy if /.well-known/security.txt is missing.
- name: Verify security.txt is live
run: |
url='https://varve.studio/.well-known/security.txt'
code=''
for _ in 1 2 3 4 5 6 7 8; do
code=$(curl -sS -o /tmp/varve-security.txt -w '%{http_code}' --max-time 20 "$url" || true)
if [ "$code" = 200 ]; then
test -s /tmp/varve-security.txt
exit 0
fi
sleep 15
done
echo "security.txt returned HTTP ${code:-error}" >&2
exit 1

# Report-only live Lighthouse after a successful smoke check. This job
# checks out the trusted workflow ref and fetches https://varve.studio —
# it must not install or execute the deployed source_sha. Failures here
Expand Down
7 changes: 7 additions & 0 deletions .gitleaks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ paths = [
# Canary sources: the scanner regression tests contain fragment-built fake
# credentials by design (see scripts/secret-scan.mjs + secret-scan.test.mjs).
'''scripts/secret-scan.test.mjs''',
# Public SHA-256 of the pinned SigLIP tokenizer.json, not a credential.
'''packages/engine/src/inference/models/siglipText.ts''',
# Audit crawl checksum field named raw_api_sha256.
'''docs/audits/photocraft/issue-ledger-follow-on-b.summary.json''',
# Public GitHub notification URLs with email_token query params from a
# third-party issue crawl. Not a Varve credential.
'''docs/audits/graphite/link-frontier.jsonl''',
]
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ update, not for someone reading the commit log.

## [Unreleased]

### Security

- Vulnerability reports now have stated response times, a `security.txt`
endpoint, an incident runbook, and CI scans (CodeQL, cargo-deny, gitleaks,
OSV-Scanner, and dependency review). Report privately to
security@varve.studio or through GitHub private vulnerability reporting.

### Added

Expand Down
Loading
Loading