Skip to content

Commit 84034db

Browse files
motxxclaude
andcommitted
fix: address OpenSSF Scorecard code-scanning alerts
- Pin Docker base images to sha256 digests (Pinned-Dependencies) - Pin codeql-action/upload-sarif to commit hash (Pinned-Dependencies) - Add harden-runner to all deploy.yml jobs - Add .github/dependabot.yml (Dependency-Update-Tool) - Add .github/workflows/codeql.yml for SAST analysis - Add SECURITY.md with vulnerability reporting policy Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent dc3bdc8 commit 84034db

8 files changed

Lines changed: 140 additions & 5 deletions

File tree

.github/dependabot.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
commit-message:
9+
prefix: "ci"
10+
11+
# npm (deno.lock / package.json)
12+
- package-ecosystem: "npm"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
commit-message:
17+
prefix: "deps"
18+
19+
# Docker
20+
- package-ecosystem: "docker"
21+
directory: "/"
22+
schedule:
23+
interval: "weekly"
24+
commit-message:
25+
prefix: "docker"
26+
27+
- package-ecosystem: "docker"
28+
directory: "/crates/tlsn-server"
29+
schedule:
30+
interval: "weekly"
31+
commit-message:
32+
prefix: "docker"
33+
34+
# Cargo (Rust crates)
35+
- package-ecosystem: "cargo"
36+
directory: "/crates/tlsn-server"
37+
schedule:
38+
interval: "weekly"
39+
commit-message:
40+
prefix: "deps"
41+
42+
- package-ecosystem: "cargo"
43+
directory: "/crates/tlsn-verifier"
44+
schedule:
45+
interval: "weekly"
46+
commit-message:
47+
prefix: "deps"
48+
49+
- package-ecosystem: "cargo"
50+
directory: "/crates/tlsn-prover"
51+
schedule:
52+
interval: "weekly"
53+
commit-message:
54+
prefix: "deps"

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
- cron: "15 4 * * 1" # Weekly Monday 04:15 UTC
10+
11+
permissions: {}
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
permissions:
18+
security-events: write
19+
contents: read
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [javascript-typescript]
24+
25+
steps:
26+
- name: Harden runner
27+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2
28+
with:
29+
egress-policy: audit
30+
31+
- name: Checkout
32+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
33+
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
36+
with:
37+
languages: ${{ matrix.language }}
38+
39+
- name: Autobuild
40+
uses: github/codeql-action/autobuild@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
44+
with:
45+
category: "/language:${{ matrix.language }}"

.github/workflows/deploy.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ jobs:
4646
token_secret: FLY_API_TOKEN_VERIFIER
4747

4848
steps:
49+
- name: Harden runner
50+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2
51+
with:
52+
egress-policy: audit
53+
4954
- name: Checkout
5055
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
5156

@@ -72,6 +77,11 @@ jobs:
7277
name: production
7378

7479
steps:
80+
- name: Harden runner
81+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2
82+
with:
83+
egress-policy: audit
84+
7585
- name: Checkout
7686
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
7787

@@ -97,6 +107,11 @@ jobs:
97107
name: production
98108

99109
steps:
110+
- name: Harden runner
111+
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2
112+
with:
113+
egress-policy: audit
114+
100115
- name: Checkout
101116
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
102117

.github/workflows/supply-chain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,6 @@ jobs:
9191
publish_results: true
9292

9393
- name: Upload SARIF
94-
uses: github/codeql-action/upload-sarif@v3
94+
uses: github/codeql-action/upload-sarif@5c8a8a642e79153f5d047b10ec1cba1d1cc65699 # v3
9595
with:
9696
sarif_file: results.sarif

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build tlsn-verifier binary
2-
FROM rust:1-bookworm AS rust-builder
2+
FROM rust:1-bookworm@sha256:fdb91abf3cb33f1ebc84a76461d2472fd8cf606df69c181050fa7474bade2895 AS rust-builder
33
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
44
WORKDIR /build
55
COPY crates/tlsn-verifier/Cargo.toml ./crates/tlsn-verifier/

Dockerfile.blossom

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/hzrd149/blossom-server:master
1+
FROM ghcr.io/hzrd149/blossom-server:master@sha256:fd4204d964e63fef17eba36aaa0c772e0c1d07026d5589c30f8c1593cb642af0
22

33
COPY blossom-config.yml /app/config.yml
44

SECURITY.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| main | :white_check_mark: |
8+
9+
## Reporting a Vulnerability
10+
11+
If you discover a security vulnerability in Anchr, please report it
12+
responsibly:
13+
14+
1. **Do NOT open a public GitHub issue.**
15+
2. Email **security@anchr.dev** with a description of the vulnerability,
16+
steps to reproduce, and any relevant logs or screenshots.
17+
3. You will receive an acknowledgement within 48 hours.
18+
4. We will work with you to understand and resolve the issue before any
19+
public disclosure.
20+
21+
Thank you for helping keep Anchr and its users safe.

crates/tlsn-server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM rust:1-bookworm AS builder
1+
FROM rust:1-bookworm@sha256:fdb91abf3cb33f1ebc84a76461d2472fd8cf606df69c181050fa7474bade2895 AS builder
22
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*
33
WORKDIR /build
44
COPY Cargo.toml ./
55
COPY src/ src/
66
RUN cargo build --release --bin tlsn-server
77

8-
FROM debian:bookworm-slim
8+
FROM debian:bookworm-slim@sha256:f06537653ac770703bc45b4b113475bd402f451e85223f0f2837acbf89ab020a
99
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates tor && rm -rf /var/lib/apt/lists/*
1010
COPY --from=builder /build/target/release/tlsn-server /usr/local/bin/
1111
COPY docker-entrypoint.sh /usr/local/bin/

0 commit comments

Comments
 (0)