Java Secure coding guidelines
1. Use Security Api's.
2. Always Close open resources use Try with Resources.
3. Use Class Loaders and Policy's for fine grain access
4. Always validate input format and input data .
5. Never grant unnecessary permission to third party code.
6. Never ignore exceptions
7. Avoid duplications.
8. Document Security Information
9. Encapsulate your changes.
10. Write Clear Code.
11. Do not log config information of your app.
12. Do not serialize security Codes.
13. Always do negative Testing against your code.
14. Use known and tested libraries
15. Always use prepared statements to handle SQL parameters.
16. Don't reveal implementation via complete error messages example userid failed or password failed.
17. Keep security releases up to date.
18. Look for dependency vulnerabilities.
19 Monitor and log user activity for brute force attack and denial of service.
Comments
Post a Comment