Sparround

Privacy, secrets and corporate constraints

The agent puts everything it reads into the context, and the context goes into a model request. So the question is: what information can leave your repo?

Sources that need attention in an Android project:

  • Signing keys*.jks, *.keystore and their passwords.
  • `local.properties` — the SDK path, sometimes keys.
  • `google-services.json`, *.p8, *.p12 — service configuration.
  • `gradle.properties` — sometimes publishing credentials.
  • Test data — fixtures containing real user data.
  • Log files — user identifiers, tokens, PII.
  • Screenshots — real account details can be visible.
json
{
  "permissions": {
    "deny": [
      "Read(./local.properties)",
      "Read(./**/*.jks)",
      "Read(./**/*.keystore)",
      "Read(./**/*.p8)",
      "Read(./**/*.p12)",
      "Read(./**/google-services.json)",
      "Read(./**/.env)",
      "Read(./**/.env.*)",
      "Read(./secrets/**)",
      "Bash(cat ~/.gradle/gradle.properties)",
      "Bash(env)",
      "Bash(printenv *)"
    ]
  }
}

A `deny` list for an Android project. The last three lines matter: reading environment variables is also a secret-leak path.

LayerWhat it doesIts limit
`.gitignore`Keeps secrets out of the repoThe file stays on disk — the agent can still read it
`permissions.deny`Blocks the agent from reading itOnly catches the paths you list
Managed settingsA developer cannot override itRequires organisation-level deployment
Secret scanning (CI)Catches a secret in a commitIt runs after the leak has already happened
Attention to contextSanitise logs and screenshots before pastingDepends on human habit

The most-forgotten channel is content you paste by hand. deny rules block the agent from reading, but they don't block a crash log or screenshot you paste into the chat yourself. A stack trace containing real user data must be sanitised first.

In a corporate context further questions arise, and their answers live with legal and security, not with the developer:

  • Is sending code to an external service permitted? Under which plan or contract terms?
  • Are there separate rules for modules handling customer data?
  • What are the data retention terms?
  • Which environment is required — the direct API, or the company's own cloud provider?

A practical rule for developers: if you don't know the answers, ask. "I didn't know" is not an answer in a compliance audit. And where a policy exists it should also be enforced technically through managed settings — a policy that lives only in a document doesn't work.

📚 Sources and documentation