When designing or assessing software like a Progressive Web Application (PWA), security isn't an afterthought—it's a core component. A secure system protects data, respects user privacy, and complies with legal requirements, ensuring users can trust your application. This guide outlines key areas you must address when evaluating and enhancing security in software.
What It Means:
Data protection ensures that user information is stored and handled securely to prevent unauthorised access, theft, or loss. This includes securing data in transit (when being sent over networks) and at rest (when stored).
Things to Look For in the Code:
Are passwords stored in plaintext?
Is sensitive data (e.g., user credentials, financial information) encrypted before storage?
Is data transmitted over a secure channel (e.g., HTTPS instead of HTTP)?
Questions to Reflect On:
What sensitive data does the PWA handle, and how is it currently being protected?
Are there vulnerabilities in the way data is stored or transmitted?
What It Means:
Security measures are the technical and procedural controls implemented to protect the application from threats like hacking, data breaches, and malware.
Things to Look For in the Code:
Are user inputs validated and sanitised to prevent SQL injection or cross-site scripting (XSS)?
Are API endpoints protected with authentication and rate limiting?
Are outdated or vulnerable libraries being used in the project?
Questions to Reflect On:
What vulnerabilities are most likely to be exploited in the current PWA?
Are all external dependencies and libraries updated to their latest secure versions?
What It Means:
Privacy protection focuses on respecting users' rights to control their personal information, ensuring compliance with privacy laws, and building trust.
Things to Look For in the Code:
Does the app collect unnecessary personal data (e.g., location, contact details)?
Are there clear mechanisms to obtain user consent before collecting personal data?
Is user data anonymised or pseudonymised when possible?
Questions to Reflect On:
What personal data is being collected unnecessarily by the PWA?
How does the application inform users about data usage?
What It Means:
Regulatory compliance ensures the software aligns with laws and standards, such as the Australian Privacy Act or GDPR. Non-compliance can lead to legal penalties and damage user trust.
Things to Look For in the Code:
Is there a privacy policy that clearly outlines how user data is collected, stored, and used?
Are data retention and deletion policies implemented in the code (e.g., automatic deletion of user data after a certain period)?
Is there a mechanism for users to access or delete their own data?
Questions to Reflect On:
Are there specific legal requirements the PWA fails to meet?
How can the app’s design better align with these regulations?
What It Means:
Authentication verifies a user's identity, while authorisation ensures they can only access features and data they are permitted to use.
Things to Look For in the Code:
Is authentication limited to username and password, or does the app offer multi-factor authentication (MFA)?
Are passwords securely hashed before being stored?
Are different user roles (e.g., admin vs. regular user) properly implemented to restrict access to certain features?
Questions to Reflect On:
How does the PWA currently verify users’ identities?
Are there features or data that should be restricted to certain user roles?
When analysing the Unsecure PWA, use the questions and checklists provided to identify specific flaws in the code. Then, propose actionable solutions for each area, explaining how they improve the security, privacy, and compliance of the application. Remember to balance security with usability to ensure your recommendations create a user-friendly and trustworthy PWA.