GitHub Copilot के साथ Software Development
Thalia Barrera
AI Engineering Curriculum Manager, DataCamp

def get_user(username):
query = f"SELECT * FROM users \
WHERE username = '{username}'"
return db.execute(query)
हमलावर SQL इन्जेक्ट कर सकता है:
users टेबल डंप कर सकता है[screencast]
[screencast]
टार्गेटेड रिव्यू
#selectionकी SQL injection और XSS कमजोरियों के लिए समीक्षा करें
पूरे कोडबेस की स्कैन
@workspaceहार्डकोडेड क्रेडेंशियल या API keys के लिए स्कैन करें
[screencast]

रक्षात्मक कोड जनरेशन
इस endpoint में input validation जोड़ें. अनपेक्षित टाइप्स अस्वीकार करें और length limits लागू करें.
सिर्फ कमजोरियाँ ढूँढें नहीं — उन्हें रोकें भी
.github/copilot-instructions.md
## Security standards
- Use parameterized queries
- Never hardcode credentials or API keys
- Validate and sanitize all user input
- Use bcrypt or argon2 for password hashing
.github/instructions/security.instructions.md
applyTo: "**/*.py"
- Use secrets module instead of random for tokens
- Escape all user input in Jinja2 templates
✅ सुरक्षा अब कोड लिखने के तरीक़े का हिस्सा बन जाती है
GitHub Copilot के साथ Software Development