Skip to content

feat(nts): add optional verificationTimeMs cert-validity override (NTS-33) #117

feat(nts): add optional verificationTimeMs cert-validity override (NTS-33)

feat(nts): add optional verificationTimeMs cert-validity override (NTS-33) #117

Workflow file for this run

name: "CodeQL"
# Static analysis for the Rust core using GitHub CodeQL.
#
# Scanned languages: Rust.
# Scanned paths: `rust/**`, excluding `rust/fuzz/**` (mirrored in both the
# `on.*.paths` filters below and `.github/codeql/codeql-config.yml`).
#
# This workflow is informational and is NOT a required status check for
# merging into `main`. Findings should be triaged in the Security tab.
on:
push:
branches: [ "main" ]
paths:
- 'rust/**'
- '!rust/fuzz/**'
- '.github/workflows/codeql.yml'
- '.github/codeql/**'
pull_request:
branches: [ "main" ]
paths:
- 'rust/**'
- '!rust/fuzz/**'
- '.github/workflows/codeql.yml'
- '.github/codeql/**'
schedule:
# Weekly on Sunday at 03:00 UTC
- cron: '0 3 * * 0'
workflow_dispatch:
# Workflow-wide GITHUB_TOKEN baseline: `contents: read` for checkout,
# `security-events: write` to publish the SARIF results to the Security tab.
permissions:
contents: read
security-events: write
# Cancel superseded runs on PR branches.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
analyze:
name: Analyze (Rust)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout repository
uses: actions/checkout@v6
# `dtolnay/rust-toolchain` only auto-detects rust-toolchain.toml at the
# repo root. Ours lives in `rust/`, so we extract the channel explicitly
# to keep `rust/rust-toolchain.toml` the single source of truth.
- name: Read pinned Rust channel
id: toolchain
run: |
channel=$(grep '^channel' rust/rust-toolchain.toml | sed 's/.*"\(.*\)"/\1/')
echo "channel=$channel" >> "$GITHUB_OUTPUT"
# Install the exact toolchain used by ci.yml so CodeQL IR extraction
# matches the production build.
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ steps.toolchain.outputs.channel }}
# Reuse the same cache logic as `ci.yml` to minimize cold-build time.
- name: Cache cargo registry + crate target
uses: Swatinem/rust-cache@v2.9.1
with:
workspaces: rust
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: rust
config-file: .github/codeql/codeql-config.yml
build-mode: none
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:rust"