Skip to content

kit scan: resolve scanner tokens via kit-secrets from a tooling/common project (drop the infisical run wrapper) #65

Closed

Description

@sandstream

Friction observed dogfooding (2026-06-23): running all 5 scanners required infisical run --projectId=<common> --env=dev -- kit scan, because kit scan gates snyk on process.env.SNYK_TOKEN and the token lives in a shared tooling project (sandstream-common), not the repo's own Infisical project. Cross-project imports into the app project were env-finicky. So today you must wrap every scan in infisical run and know the common project id + env.

The convention we settled on (worth making first-class):

  • one Infisical project per app/repo (kjorre, gamedaydj, kit…), bound via that repo's .infisical.json
  • one sandstream-common tooling project for cross-cutting creds: SNYK_TOKEN (in dev), shared CI/agent tokens
  • tooling commands run against common; app runtime runs against its own project

Build:

  • [secrets] (or a new [tooling_secrets]) can declare a tooling source project (e.g. source = "infisical", project = "sandstream-common", env = "dev") distinct from the repo's app-secrets binding
  • kit scan resolves scanner tokens (SNYK_TOKEN, …) via kit's own secrets layer (secret-backends.ts/execCli, which already speaks Infisical) from that tooling source — so plain kit scan works, no infisical run wrapper, no project-id/env to remember
  • kit check flags a missing/declared-but-unresolvable scanner token (ties to the scanner-readiness idea) instead of you discovering it at scan time
  • doc the per-repo + sandstream-common pattern (and that Snyk's own org/projects are separate from Infisical projects)

Depends on / complements #62 (the runner), #64 (mise on PATH). Keeps kit zero-LLM + local-first; the secret still flows vault→process, never logged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlogenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions