Skip to content

feat(auth): accept a Basilisk user API token for CI audits - #43

Merged
nichmor merged 23 commits into
mainfrom
feat/basilisk-api-token
Oct 14, 2026
Merged

nichmor merged 23 commits into
mainfrom
feat/basilisk-api-token

Conversation

@nichmor

@nichmor nichmor commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Stacked on #40.

  • Accept PIXI_AUDIT_TOKEN or an exact-host stored Basilisk API token, scoped to the configured origin over HTTPS or local HTTP.
  • Prefer API tokens over the shared Pixi login. Reject malformed environment tokens without exposing them; do not retry rejected API tokens anonymously.
  • Document CI setup and preserve the released Rattler dependencies and shared-login flow from feat(auth): reuse Pixi login for optional Basilisk authentication #40.

Server-side token attribution in Basilisk is separate from this client change.

Validation

249 workspace tests and 88 no-default-feature library tests pass. One focused API-token test reuses #40's request-capture helper to verify the Bearer header and HTTP 401 propagation without retry. Formatting, all-target no-default-feature checks, and all-feature Clippy pass.

nichmor and others added 3 commits October 2, 2026 13:58
Add PIXI_AUDIT_TOKEN, a Basilisk user API token (bsk_<key id><secret>)
generated under Settings on the Basilisk explorer, as the credential for
unattended audits. The token is sent as Authorization: Bearer to the
configured Basilisk origin only, never to OSV, EPSS, KEV or package
channels, and only over HTTPS or plain HTTP to localhost. A malformed
value is an error rather than a silent anonymous audit, so a
misconfigured CI secret fails the job.

Outside CI the same token may be stored for the exact audit host with
pixi auth login; only a BearerToken under the exact host with the token
shape is used, so the wildcard *.prefix.dev channel credential can never
reach the audit API. The token takes precedence over the --login
audience grant, which the audience middleware yields to because the
Authorization header is already set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@nichmor
nichmor added this pull request to stack #44 October 7, 2026 09:55
Comment thread crates/pixi_audit_cli/src/auth.rs Resolved
Comment thread crates/pixi_audit_cli/src/auth.rs Resolved
Base automatically changed from feat/basilisk-audience-auth to main October 14, 2026 13:15
@nichmor
nichmor merged commit de5571d into main Oct 14, 2026
2 checks passed
@octo-sts octo-sts Bot mentioned this pull request Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants