Skip to content

Security sweep — 2026-W42 #10

Closed as duplicate
Closed as duplicate

Description

@srmcguirt

Automated weekly security sweep for fellwork/magna (default branch main, public Rust workspace, dual MIT/Apache-2.0). GitHub access limited to mcp__github__* tools (no gh CLI, no raw REST) — see "Not checked" below.

CRITICAL

None found this run.

1. Alerts & settings — KNOWN GAP (informational)

Dependabot alerts, code-scanning alerts, secret-scanning alerts, security_and_analysis, branch-protection/ruleset detail, and Actions permissions settings were not checked this run — no available mcp__github__* tool covers these REST endpoints, and raw gh/curl was out of scope. Recommend a human spot-check the Security tab.

2. Dependency audit

  • cargo-audit is not preinstalled on this host. One install attempt was made (cargo install cargo-audit --locked); it did not complete within ~90s and was abandoned per policy rather than retried. Rust dependency audit (Cargo.lock, 422 resolved crates) was skipped this run — not re-verified. (Prior runs reported quinn-proto RUSTSEC-2026-0185 (high, 7.5), rsa RUSTSEC-2023-0071 (medium, in the JWT-verification path, no upstream fix), rustls RUSTSEC-2026-0285 (medium), crossbeam-epoch RUSTSEC-2026-0204 (medium) — carry these forward as unconfirmed this run, not newly verified.)
  • No bun.lock/package-lock.json in this repo (pure Rust workspace) — JS/TS audit N/A.
  • cargo deny check: not run this run (prior runs reported it fails outright due to a deny.toml schema using keys the installed cargo-deny 0.20.2 rejects as removed — a config-governance issue, not re-verified this run).

3. Workflows

  • ci.yml: missing a top-level permissions: block. Triggers on pull_request (4 jobs: test/clippy/fmt/publish-dry-run). actions/checkout@v4 defaults to persist-credentials: true and none of the jobs override it — public repo, no secrets used in this workflow, so practical impact is low, but it is a real hardening gap per the sweep's explicit check. Actions pinned by tag, not SHA (actions/checkout@v4, Swatinem/rust-cache@v2). No pull_request_target, no secrets passed to untrusted input, no ${{ github.event.* }} interpolated into any run: step. The publish-dry-run job only runs cargo publish --dry-run (no real publish credentials) — left untouched per the "never touch publishing/release logic" rule.
  • gqlmin-size.yml: missing a top-level permissions: block. Triggers on pull_request (paths-filtered to crates/magna-gqlmin/**); same persist-credentials-default-true gap. Uses dtolnay/rust-toolchain@nightly — a floating/rolling channel reference, not a SHA or stable version tag (higher drift/supply-chain risk than a normal pin). Downloads binaryen directly from its official GitHub Releases over HTTPS — legitimate source, but unpinned to a checksum.

4. Repo settings

  • SECURITY.md present at root, points to a real disclosure contact (shane@fellwork.com, 2-business-day ack / 14-day critical-patch SLA) — good, no action needed.
  • No .github/dependabot.yml.
  • Branch protection/rulesets/Actions permissions: not checkable this run (see §1).

5. Code grep

  • No hardcoded secrets (AKIA/ghp_/sk-/PEM) anywhere in crates/.
  • No Command::new/std::process::Command anywhere in crates/ — no shell-injection-shaped pattern to review.
  • No tracked .env*, no wrangler.toml/fly.toml (not applicable to this repo).
  • SQL construction (crates/magna-sql/src/render.rs, crates/magna-build/src/executor/mod.rs, crates/magna-build/src/executor/sql_bridge.rs) uses format!() to interpolate identifiers only (schema/table/column names, which come from server-side introspected resource metadata, not raw request input) into query strings, while values are always bound via $1/$2 placeholders (sqlx::query(&sql).bind(...)). No raw user-controlled value is ever string-interpolated into SQL in the paths reviewed (select_by_pk, select_by_fk_batch, select_by_pk_batch, total-count query). No SQL-injection pattern found — informational, worth a periodic re-check if identifier-sourcing logic changes. No SQL migrations in this repo to check for SECURITY DEFINER/RLS-bypass (that's fellwork-data's domain, confirmed no .sql files present).
  • No eval/new Function equivalent (Rust workspace, N/A).

6. Severity ranking

  • Critical: none.
  • High: none confirmed this run (prior-week quinn-proto RUSTSEC-2026-0185 not re-verified — audit tool unavailable).
  • Medium: missing permissions: blocks on both workflows (fix already proposed, unmerged, PR chore(security): add top-level permissions blocks to workflows #7/Security sweep 2026-W40: add missing workflow permissions blocks #8); persist-credentials default-true on both pull_request-triggered workflows (not one of the three allowed mechanical-fix types, reported only); Rust dependency audit posture unverified this run (tooling gap).
  • Low: dtolnay/rust-toolchain@nightly floating-channel pin; unpinned binaryen download; tag-pinned (not SHA) actions generally; prior-week cargo deny check config-schema drift (not re-verified).
  • Informational: KNOWN GAP — alert dashboards/repo security settings not checkable via available tools; SQL-building pattern reviewed, no injection found.

Mechanical PR

No new PR opened this run. PRs #7 (claude/magna-security-2026-W38) and #8 (claude/magna-security-2026-W40) already propose the exact needed fix (top-level permissions: {contents: read} for ci.yml/gqlmin-size.yml), and both remain open/draft/unmerged — opening a third would be redundant. Recommend merging #8 (supersedes #7) and closing #7. SHA-pinning dtolnay/rust-toolchain@nightly and resolving the cargo deny schema drift remain out of scope for this run's mechanical-fix allowlist.

Activity

  1. srmcguirt commented on Oct 16, 2026

    @srmcguirt
    MemberAuthor

    Marked needs-spec: this is a report bundling several independent follow-ups (merge PR #8 and close #7, re-run cargo-audit, fix the cargo-deny schema drift) rather than one scoped, actionable fix.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions