Hacker News new | ask | show | jobs
by samuelknight 3 days ago
Most hostile traffic will be scanners. No legitimate user will request /.env or random frameworks you don't use so it's easy to automatically detect and block the IP for a week. You should try to put as many active components as possible behind auth where they are required to register with an email, phone, etc. It won't stop an agent but it will filter an attacker not willing to jump through hoops and create more forensic evidence. If you are still worried, put a juicy looking booby-trap route in your code that an agent might pick up by reading javascript bundles. Requesting that route is an IP ban or alert.

Remember that code is cheap now. Have your agents write unit tests on all logic. When it's done move on to property testing. Once property testing is done you can do heavy fuzzing nightly. Then move on to mutation testing. Mutation testing is another form of coverage and your agent will recommend a mix of new coverage and suppression.

A last line of defense are canary tokens (https://canarytokens.org/) on all backend systems and dev machines. This could give you precious time to rotate keys and lock down customer data if someone breaks into your site through the front door or compromises you with a supply chain attack.

Another user mentioned WAF, but they don't hinder offensive agents in my experience. Agents can move like users, and WAFs have to be permissive of user actions. If you have a business behind your website my company builds a self-serve agentic pentesting platform that you might be interested in (see profile).