Work effectively with AI coding agents. Understand them as language models running in a tool loop with limited context, which is why they guess, game the visible signal and report confidently. Recognise the shortcut and correctness tells in their code across Python, TypeScript/JavaScript, Rust, Java and Go, and know the damage each one does later. Verify changes instead of trusting them, review diffs fast for quality and security, judge when work is truly finished, and choose, design and steer tasks so agents can finish them well.
Security checks switched off to make it work
card 3 of 6
Six tells and the attack each opens
builds on: Agents optimise the signal they can see, Trust boundaries and untrusted input
- `verify=False` (Python), `InsecureSkipVerify: true` (Go), `rejectUnauthorized: false` or `NODE_TLS_REJECT_UNAUTHORIZED=0` (Node) → man-in-the-middle: anyone on the network path can pose as the server and read or alter the traffic.
- `Access-Control-Allow-Origin: *` → any site's scripts can read responses that need no login, e.g. an internal API reachable from the user's network. Echoing any `Origin` with credentials is worse: any site can read logged-in users' data.
- CSRF disabled (cookie login) → other sites can make a logged-in user's browser submit actions with their cookie.
- `chmod 777` → every local user and process can read, rewrite and execute the file.
Terms on this card
- man-in-the-middle
- An attacker on the network path (Wi-Fi, proxy, hijacked DNS) who poses as the server to read or alter traffic.
- Origin
- The scheme, host and port of the page making a browser request, e.g. https://app.example.com. Browsers send it in the Origin header.
- credentials
- In CORS, the cookies or other login data a browser attaches to a request. Reading such responses cross-origin needs Access-Control-Allow-Credentials: true, and browsers then refuse `*` as the allowed origin.
- CSRF
- Cross-Site Request Forgery: another site makes a logged-in user's browser send a state-changing request that automatically carries their cookies.
- chmod 777
- A Unix command that gives every user on the machine read, write and execute permission on a file or directory.
Lesson goal: Recognise protections turned off to get past an error: `verify=False`, Go's `InsecureSkipVerify`, Node's `rejectUnauthorized: false`, `Access-Control-Allow-Origin: *`, disabled CSRF protection and `chmod 777`. Explain the attack each one opens up. ·
the whole lesson