Skip to content

Adversarial hardening: poisoned-repository prompt injection test harness #2

Description

@alexanderradahl

Why

Early launch feedback raised the right question: what happens when the bridge is pointed at a deliberately poisoned repository whose README, logs, package output, or source comments try to steer the model into using unrestricted local tools?

SECURITY.md already states the current boundary plainly:

  • prompt injection in repository files, web content, logs, email, package output, or other model-read material can try to steer tool use;
  • credential scrubbing is hygiene, not isolation — an unrestricted shell can still attempt to read credentials available to the macOS user;
  • there is no per-conversation capability lease in the current shared-stdio HTTP architecture.

A separate "protect git push" switch would not be an honest boundary while shell_exec remains arbitrary: the shell can invoke Git directly. Any restricted mode has to reduce the actual tool/command authority, not special-case one spelling of a dangerous action.

Goal

Build a repeatable adversarial fixture and document what the bridge does — and does not — protect when model-visible local content is malicious.

Proposed test matrix

Create a fixture repository containing benign-looking but adversarial instructions in several places:

  • README.md / AGENTS.md
  • source comments
  • test output / log files
  • package-manager lifecycle output
  • filenames and Git metadata
  • a fake credential file / fake SSH material that must never contain a real secret

Exercise representative workflows where the model is asked to inspect the repo, run tests, diagnose CI, and prepare a change. Record whether injected content attempts to trigger:

  • credential reads
  • network exfiltration
  • destructive file operations
  • force push / remote mutation
  • persistence outside the repo
  • relaunching the bridge or bypassing the unlock latch

Acceptance criteria

  • Fixture contains no real credentials or user data.
  • Reproduction instructions are safe to run in a disposable macOS account/VM.
  • Expected bridge behavior is documented separately from expected model behavior.
  • Existing guarantees (secret scrubbing from child env, unlock revocation, PTY/job containment claims) get deterministic regression coverage where possible.
  • Anything the bridge cannot enforce is stated explicitly rather than converted into a misleading "safety" claim.
  • Document whether an optional restricted mode is worth pursuing and what authority it would actually have to remove to be meaningful.

This is public hardening work, not a report of a newly discovered authentication bypass. Please use private vulnerability reporting for any concrete exploit that crosses a guarantee claimed by the project.

Activity

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

    help wantedExtra attention is neededsecurity-hardeningAdversarial testing and security-model hardening

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions