Workshops: Secure Agentic Coding & Governance

Keeping Secrets Away from Coding Agents: Half-Day Workshop

Everything a coding agent reads ends up in its context, and therefore with the model provider, in session transcripts and possibly in generated code. One readable .env file is enough for a production API key to slip out of your control. In this half-day workshop you close the typical gaps and practise what to do when something gets through anyway.

Who is this workshop for?

  • Developers working with Claude Code, Codex, Cursor or Copilot
  • Tech leads responsible for repository standards
  • Security and DevSecOps teams
  • Platform teams running vaults and CI secrets
  • Information security officers

What you will take away

  • Know the routes by which secrets reach an agent's context, including the less obvious ones.
  • Block sensitive files with deny rules and ignore files for the agents you use.
  • Switch to runtime injection from a vault and short-lived, narrowly scoped tokens.
  • Set up secret scanning before commit, in CI and for agent transcripts.
  • Have a rehearsed procedure for revoking and rotating compromised credentials.

Agenda

  1. Module 1

    How secrets reach the agent

    • .env files, configuration, shell history and environment variables
    • Terminal output, pasted logs and stack traces
    • Plain-text tokens in MCP configuration files
  2. Module 2

    Keeping them out

    • Deny rules in Claude Code, ignore files in Cursor and comparable settings
    • Placeholders and .env.example instead of real values
    • Runtime secrets from a vault or cloud secret manager
  3. Module 3

    Detecting leaks

    • Pre-commit hooks with tools such as gitleaks or TruffleHog
    • Secret scanning and push protection on your Git platform
    • Scanning session transcripts and agent logs for secrets
  4. Module 4

    When it happens

    • Exercise: a leaked key in an agent's pull request
    • Revoke, rotate, check usage in the provider's logs
    • Lessons learned and updated rules

Every file the agent reads can end up in a prompt

Many teams rely on .env files being listed in .gitignore. That prevents the commit, but not an agent reading the file while trying to understand an error. Passwords also travel in error messages that developers paste for analysis, or sit in plain text in MCP configuration.

On top of that, agents often store session histories locally. Whatever was in the context then lives on laptops, in backups and possibly in synced folders.

A pragmatic baseline

For most teams a compact baseline is enough, and it can be set up within half a day. We adapt it to your tools and secret infrastructure and bring ready-made templates.

  • No production credentials on developer machines
  • Deny rules for sensitive files in every repository
  • Secret scanning before every push
  • A documented rotation procedure per secret type

Tailored to your tools, in one morning

We show the concrete settings for the agents your team actually uses, such as Claude Code, OpenAI Codex, Cursor, GitHub Copilot or Gemini CLI. The principles apply to any agent. The half-day runs remotely or on-site, in English or German, and combines well with a session on sandboxing.

Frequently asked questions

Is adding .env to .gitignore enough?

No. The .gitignore only prevents the commit. An agent can still read the file unless you block it explicitly with a deny rule or avoid storing the values locally at all.

Are secrets in the context sent to the model provider?

Yes, everything in the context is sent to the model unless you use a local model. Business accounts govern storage and use of that data, but a leaked key should still be treated as compromised.

What if an agent has already seen a key?

Revoke and rotate it rather than waiting. Then check the service's logs for unusual use and close the gap through which the secret reached the context.

Workshop

Get in touch

Do you know which of your credentials your coding agents have already seen?

Tell us roughly how many people will join and pick dates that work – we will get back to you within 24 hours with a proposal for content, format and schedule.

Prefer to talk first?

15 minutes, free and without obligation – with our AI Trainers and AI Code Engineers.

Book a call for free (opens in new tab) +49 761 519 751 50 (24/7)

Request a training / workshop

Workshop: Keeping Secrets Away from Coding Agents: Half-Day Workshop · Half day (approx. 4 hours)

Dates that work for you (optional)

Suggestions about 2 weeks ahead – pick as many as you like

Reply usually within 24 hours · jocapps is ISO 27001 certified · Privacy