How do you use AI in cybersecurity?

Security engineers use AI to explain suspicious code and logs, summarize scanner findings, draft detection rules and write secure code examples. At the same time, AI creates new work: AI-generated code often contains common vulnerabilities, and apps built on LLMs bring new risks like prompt injection and data leaks. Both sides are now part of the job.

Get started - freeLive cloud workspace in your browser · nothing to install

Using AI for security work

AI helps you read a large diff or log quickly, explain what an unfamiliar script does, triage long lists of scanner findings and draft rules or queries. Verify every finding yourself; AI misses real issues and reports ones that are not there.

Reviewing AI-generated code

Code written by AI tools often includes classic problems: SQL built from strings, missing access checks, secrets in source, weak password hashing, unvalidated redirects. Code review and scanning tools such as Semgrep, Bandit or Gitleaks catch some of these; the rest needs a person who knows what to look for.

Securing apps that use LLMs

Apps that call language models face prompt injection, leaking data through model output, and agents with too much access. Treat model output as untrusted input, limit what tools an agent can call, and keep secrets out of prompts.

How to build the skill

Practice finding and closing real vulnerabilities in running apps, so you recognize them quickly when they show up in AI-written code. Each completed HeyDevJob security project goes on a portfolio you can show employers.

Real Security work to put in your portfolio

How to Fix SQL Injection With Parameterized QueriesSQL injection via f-string queries lets attackers dump your whole database. Fix it with parameterized queries...How to Fix an IDOR Broken Access Control VulnerabilityFix an IDOR broken access control bug in a Flask billing API: add a server-side ownership check so users can...How to Remove Hardcoded Credentials From Source CodeHow to remove hardcoded database credentials from Python code: read the password from os.environ, keep it out...

Related questions

Is AI used by attackers too?

Yes. It lowers the effort for phishing and for writing simple tooling. That raises the value of defenders who understand systems well enough to spot what automated tools miss.

What is prompt injection?

Text that tricks an LLM into ignoring its instructions, for example hidden instructions inside a document the model reads. It matters most when the model can take actions or see private data.

Should security beginners learn AI or fundamentals first?

Fundamentals first: networking, web vulnerabilities, Linux and authentication. You need them to judge whether an AI answer is right.

Do real production work, free. Live cloud workspaces in your browser - every project you complete lands on your portfolio.

Get started - free
Get started - free