RachnaSutra AI GitHub

Security and privacy

Summary#

RachnaSutra is designed so that running it cannot send your code anywhere and cannot change your files unless you ask. This document lists the controls, the threat model, how each control is tested, and the residual risks.

Data handling#

DataHandling
Source codeRead locally; never transmitted by the CLI
Report excerptsTruncated to 160 characters; secrets masked
ReportsWritten by audit and accessibility to ./rachnasutra-reports (or --out); skip with --no-report; the folder is git-ignored and never scanned
TelemetryNone
NetworkNone; the package contains no network code
CredentialsNever requested, stored or read by the CLI
Model callsNone from the CLI; skills use the host's model under the host's policy

When skills run inside an AI IDE, the code the assistant reads is processed by that IDE's model provider under the user's agreement with that provider. That is outside RachnaSutra's control; check your provider's data policy.

Threat model#

#ThreatControlTest
T1Malicious file content tries to steer the auditFiles are data; the CLI never executes or evaluates them"prompt-injection text in audited files does not change results"
T2Skill instructions are subverted by repository textSkills tell the model to treat repository text as data and to ask before actingReview of skill text; verify ensures a Safety section
T3Path traversal through flags or configsafeJoin; output and install targets resolved and contained"security: traversal rejected..."
T4Symlink escapeSymlinks are never followedWalk implementation; counted in skipped.symlinks
T5Secret leakage into reportsRedaction on excerpts and rendered text"redact masks secrets; excerpts never leak them"
T6Script injection in HTML reportAll dynamic values escaped; no scripts; no remote assets"malicious content is escaped in HTML and Markdown reports"
T7Table or markup breakage in MarkdownCell escapingSame test
T8Overwriting user-edited filesHash manifest, conflict detection, backup, --force"install/uninstall: dry-run, hash tracking, conflict, preserve edits"
T9Resource exhaustion on huge repositoriesFile, size and time budgets; hit caps per rule and file"walk skips node_modules, respects file limit and flags truncation"
T10Supply-chain compromiseZero runtime dependencies; dev dependencies pinned by lockfile; CI uses read-only permissionsnpm ls --omit=dev in CI
T11Silent success on unavailable featuresExit code 3 and message"CLI: exit codes, json, not-available honesty..."

Controls in detail#

  1. Audited files are never modified. The only write paths are report files from audit and accessibility, skills install and skills uninstall.
  2. Path containment. safeJoin rejects any resolved path outside the root.
  3. Bounded work. Defaults of 5,000 files, 512 KB per file and 15 seconds.
  4. Redaction patterns. AWS keys, GitHub tokens (classic and fine-grained), OpenAI-style keys, Slack tokens, Google API keys, private key headers and quoted credential assignments.
  5. Report safety. HTML uses no inline scripts and no external requests, so it can be opened offline and emailed safely.
  6. CI permissions. The workflow requests contents: read only.
  7. No elevated credentials are used for pull requests from forks.

Planned browser mode requirements#

Not implemented. When added it must require explicit authorization, an origin allowlist, blocked cloud-metadata and internal addresses in server mode, credentials from a user-managed secret store, screenshot masking, and must run isolated from the repository.

Residual risks#

RiskNote
Redaction is pattern-basedUnusual secret formats can pass through. Do not publish reports without review
Regex parsingCrafted input could cause slow matching; time and file limits bound this
AI host behaviourSkills reduce but cannot eliminate prompt-injection risk in a model
Report files contain code excerptsTreat reports as sensitive as source, or run with --no-excerpts (titles can still quote short source text)

Responsible disclosure#

Report vulnerabilities privately through GitHub: https://github.com/shahvatsalofficial/rachnasutra/security/advisories/new. Target response: acknowledgement within 7 days, status within 30 days, best effort. See SECURITY.md.

Hardening checklist for adopters#

  • Pin the version in CI (npx github:shahvatsalofficial/rachnasutra#<tag>) once tagged releases exist.
  • Review reports/ before sharing.
  • Do not run any tool on code you are not authorized to review.
  • Keep AI IDE permissions narrow; require approval for edits.