Coding with AI tools

Stage 8 of 10 · 6 lessons · ~2 weeks

Security and licences

Keep secrets and sensitive data out of prompts, check every dependency an AI suggests, recognise the insecure patterns it repeats, scan automatically, and respect licences, data settings and AI policies.

Start: What never goes into a prompt

Lessons· one lesson for each topic, in this order

  1. 1What never goes into a prompt
  2. 2Hallucinated packages and new dependencies
  3. 3Insecure patterns AI repeats
  4. 4Scanning code and secrets automatically
  5. 5Licences, data settings and AI policies
  6. 6Security rules in your instructions fileOptional

Do this

  • Write your never-paste list and share it with your team or group.
  • Move any secret in your code into environment variables and rotate it if it was ever committed.
  • Add four concrete security rules to your instructions file.
  • Run a secret scanner and a SAST tool locally, then add both to CI.
  • Check one AI-suggested dependency on its registry before installing.
  • Read your tool's data settings and your employer's or university's AI policy.

Start with· follow one of these

Practise

Keep handy

  • Scan your repository and its history for leaked keys before you push

  • What common open source licences require, in plain language

Also worth your time

Before moving on: A never-paste list pinned by your desk, security rules in your instructions file, Gitleaks and Semgrep (or your stack's equivalents) running locally and in CI, and one AI-suggested dependency you checked before installing.

Tauseef's advice
Security with AI tools is mostly about habits you set once: secrets out of the project, a short list of concrete rules, scanners in CI and a pause before every new dependency. Set them up in an afternoon and they protect every session after.

Mark this stage as not done?