Security Considerations in Software Development Projects
With the introduction of AI tools, cybersecurity has become paramount. Bad actors can easily misuse these AI tools to exploit vulnerabilities in software applications. As such, Developers have a responsibility to write software applications that are more secure and resistant to attacks.
Some security considerations to be mindful of throughout the development process of any new software application. This is not an exhaustive list.
Choose 3rd Party Libraries Wisely - If you absolutely need to work with a third party, ensure that the library you choose is backed by a strong developer community with on-going and an up to date support and patch updates. Patch them as soon as security updates are available.
Avoid using Default Configurations - When setting up your database, web server or even firewall, avoid using the default configurations, make sure you change them and disable default accounts if any.
Minimize Privileged Access - Avoid using root or default accounts and create separate user accounts with minimal privileges.
Sanitize User Input - Do not trust the user input and always sanitize or html encode the user inputs before processing them further, this will render any injected code in the user input useless.
Prevent Cross-Site Request Forgery (CSRF) - Verify user requests using antiforgery tokens to prevent unauthorized actions. Even though an attacker might highjack a user's session, they will not have the token required for authorized actions.
Prevent Cross-Site Scripting (XSS) attacks with Content Security Policy (CSP) Headers - Restrict the sources on your web page from which the browser can load/execute scripts and other resources, thereby preventing any attempts of XSS attacks or injection of malicious scripts on your webpage.
Set Proper File Permissions - Limit your application's access to its own folder/directory and verify file paths before any modification - ensure filepaths provided by users do not intentially navigate to other sensitive directories.
Protect Passwords - Always hash and salt passwords before storing them.
Scan Uploaded Files - Integrate your app with an Antivirus/Malware Scanner API and check for malware or viruses before storing user-uploaded documents.
Secure network access - Implement firewalls on web and database servers, restricting access to authorized ports and IP addresses.
Use Unique Identifiers in API Endpoints - Use non-sequential identifiers (GUIDs) in POST/PUT/DELETE methods instead of Integer IDs to prevent predictable resource modification.
Exclude Sensitive Information from Version Control - Avoid storing sensitive data like API keys or database credentials in version control.
Exclude Server Information from Response Headers - Do not reveal the server software and version to the public in request response headers. Attackers may use this information to exploit known vulnerabilities.
Use Secure Connections - Install and configure SSL certificates for secure communication.