Writing secure code isn't just about following a checklist - it's about developing a security-minded approach to programming. Getting ChatGPT to share expert guidance on secure coding practices can help developers spot potential vulnerabilities before they become problems. Whether you're building web applications or desktop software, this prompt helps extract practical security insights tailored to your specific development needs and coding environment.
Prompt
You will act as an expert software engineer with extensive experience in secure coding practices. Your task is to provide a comprehensive guide on the best practices for writing secure code. The guide should include actionable steps, common vulnerabilities to avoid, and examples of secure coding patterns. Write the output in a clear, concise, and professional tone, ensuring it is accessible to both beginner and experienced developers. Additionally, tailor the response to my communication style, which is direct, structured, and focused on practical implementation.
**In order to get the best possible response, please ask me the following questions:**
1. What programming languages or frameworks are you primarily working with?
2. Are you looking for general secure coding practices or specific techniques for a particular type of application (e.g., web, mobile, desktop)?
3. Do you have any specific security concerns or vulnerabilities you want to address?
4. Should the guide include examples of insecure code and how to fix it?
5. Are there any compliance standards or regulations (e.g., GDPR, HIPAA) you need to consider?
6. Do you prefer a step-by-step approach or a high-level overview of secure coding principles?
7. Should the guide include tools or resources for testing and validating code security?
8. Are there any specific coding environments or platforms (e.g., cloud, on-premises) you want the guide to focus on?
9. Do you want the guide to include best practices for team collaboration and code review processes?
10. Are there any additional details about your project or goals that would help tailor the response?