Test legat de ghid · Greu Nivel
Security Risks of AI-Generated Code Quiz
Identify risks in generated code, review dependencies and trust boundaries, isolate execution, and apply security controls.
Întrebare 1 de 8
O interogare SQL generată de AI inserează textul utilizatorului direct într-un șir de comandă. Ce ar trebui să verifice recenzentul?
Previzualizează fiecare întrebare8 întrebări
Răspunsurile și explicațiile apar pe măsură ce susțineți testul.
- O interogare SQL generată de AI inserează textul utilizatorului direct într-un șir de comandă. Ce ar trebui să verifice recenzentul?
- Whether the query has a descriptive variable name
- Use of parameterized queries and validation for untrusted input
- Whether the assistant gave a high confidence score
- Whether the demo used a small database
- Un patch generat adaugă un pachet nou cu un nume plauzibil. Ce ar trebui să se întâmple înainte de a-l adăuga la producție?
- Assume the package exists because the import compiles in the answer
- Copy its name into a deployment script immediately
- Verify the exact package and assess its maintainer, version and security advisories
- Disable dependency scanning to avoid warnings
- De ce este periculos pentru o aplicație să transmită text generat de model direct către un shell sau API privilegiat?
- Unvalidated output could trigger unintended commands or actions
- The model will always refuse unsafe input
- A shell cannot run text produced by software
- Output validation only matters for images
- Un script generat trebuie testat, dar comportamentul său este necunoscut. Ce mediu este mai sigur?
- A production server with administrator access
- A developer laptop containing all personal tokens
- A shared environment with unrestricted network and file access
- A sandbox with minimal permissions and no production credentials
- Un instrument de scanare a codului nu raportează nicio constatare cu privire la o modificare generată. Ce poate concluziona echipa?
- The patch is safe against every threat
- The scanner found no issues within its checks, but this does not prove the code is secure
- Manual review is unnecessary
- The code cannot contain logic errors
- Which set of controls offers stronger review than relying on the model alone?
- A request for the model to certify its own code
- A successful compilation only
- Code review, tests, dependency and secret scanning, plus threat-model checks
- A copy of the generated code in a README
- Why should an agent have explicit approval before deploying or deleting data?
- Those actions can have high impact and should remain under accountable human control
- Approval makes the code compile faster
- Deployment removes all security vulnerabilities
- Deleting data is always reversible
- A developer wants to protect credentials while asking an AI assistant for help. What is the safest prompt practice?
- Paste production tokens so the model can test them
- Include all environment files to avoid missing context
- Ask the model to remember credentials for the next task
- Remove secrets and use an approved service with only the necessary code context