{"id":28745,"date":"2025-11-08T17:32:00","date_gmt":"2025-11-08T16:32:00","guid":{"rendered":"https:\/\/www.web-systems.pl\/web-application-security-guide-software-house\/"},"modified":"2025-11-08T17:32:00","modified_gmt":"2025-11-08T16:32:00","slug":"web-application-security-guide-software-house","status":"publish","type":"post","link":"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/","title":{"rendered":"The complete guide to web application security in a software house"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">At Web Systems we have been building web applications for over twenty years. E-commerce platforms, B2B systems handling thousands of transactions a day, extensive customer portals &#8211; we have been through all of it. And every project teaches us the same lesson: web application security is not a feature you bolt on at the end like a cherry on top. It is a process. Continuous, evolving, built into every stage &#8211; from the first architecture sketch to daily production maintenance. Neglect it and the bill arrives fast. A leak of customer personal data? GDPR fines of up to 4% of annual turnover are one thing. But losing the trust of business partners &#8211; that cannot be undone. Our \u0141\u00f3d\u017a studio has taken over projects after serious security incidents. Rebuilding the reputation and repairing the systems cost many times more than proper protection from the start. That is why we share here the concrete practices we apply every day to build applications resilient to modern threats.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_86 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Spis tre\u015bci<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Web_application_security_starts_with_architecture\" >Web application security starts with architecture<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#OWASP_Top_10_%E2%80%93_the_real_threats_we_meet_in_projects\" >OWASP Top 10 &#8211; the real threats we meet in projects<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#A_secure_software_development_lifecycle_SDLC\" >A secure software development lifecycle (SDLC)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Authentication_authorization_and_session_management\" >Authentication, authorization and session management<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Data_protection_and_GDPR_compliance_in_web_applications\" >Data protection and GDPR compliance in web applications<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Monitoring_incident_response_and_continuous_improvement\" >Monitoring, incident response and continuous improvement<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#FAQ_%E2%80%93_frequently_asked_questions_about_web_application_security\" >FAQ &#8211; frequently asked questions about web application security<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#How_much_does_comprehensive_security_in_a_web_application_cost\" >How much does comprehensive security in a web application cost?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Does_a_small_B2B_application_also_need_advanced_security\" >Does a small B2B application also need advanced security?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#How_often_should_an_application_security_audit_be_carried_out\" >How often should an application security audit be carried out?<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.web-systems.pl\/en\/web-application-security-guide-software-house\/#Web_application_security_is_a_process_not_a_product\" >Web application security is a process, not a product<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Web_application_security_starts_with_architecture\"><\/span>Web application security starts with architecture<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Without solid architecture there is no secure application. Period. Every new project at Web Systems starts with clear boundaries between modules &#8211; separation of concerns. In practice that means splitting the system into layers: data, business logic, presentation. Each layer gets its own security policy, independent validation and separate access rules. Why? Because even if an attacker breaks through one layer, the rest still protects the critical assets.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>&#8220;The most important architectural principle is separation of concerns &#8211; dividing the application into methods, classes, modules and layers with clearly defined responsibilities and boundaries. A well designed architecture defines explicit boundaries between the parts of the application and sets out the scope of responsibility of each one.&#8221;<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">The principle is familiar from general design patterns, but in web application security it carries an entirely different weight. I have seen projects where the authorization logic was so tangled with the business logic that a user with limited permissions could do things reserved for an admin. Why? Because the permission check happened only at the interface level. Another classic &#8211; no data validation at the layer boundaries. Malicious input goes straight to the database without any filtering. Seriously, this happens more often than you think.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tip:<\/strong> Design the architecture with security in mind from day one (security by design). Do not add protection after the fact &#8211; define the security policies for each layer while you are still planning. In our company every architecture document contains a section devoted to the threat model. That way we identify potential attack vectors before anyone writes the first line of code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"OWASP_Top_10_%E2%80%93_the_real_threats_we_meet_in_projects\"><\/span>OWASP Top 10 &#8211; the real threats we meet in projects<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The OWASP Top 10 list is not academic theory. Our development team runs into these threats regularly &#8211; in the projects we audit and in those we take over from other companies. Injection attacks (SQL injection, NoSQL injection) &#8211; still alive and doing very well, especially wherever someone builds database queries by concatenating strings instead of using parameterized queries. Broken authentication? Even more often. From trivial blunders such as plaintext passwords to subtler holes in the password reset mechanism that let an attacker take over any account.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Cross-Site Scripting (XSS) is the plague of e-commerce applications and CMS platforms &#8211; anywhere user content lands on pages without sanitization. We once took over an online store project where the product description field allowed JavaScript injection. The attacker could intercept other customers&#8217; payment card data. Very elegant indeed. CSRF (Cross-Site Request Forgery), in turn, abuses the server&#8217;s trust in the browser of a logged-in user and forces unauthorized operations.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Injection (A03:2021)<\/strong> &#8211; use parameterized queries and an ORM, never build SQL queries by concatenating strings with input data<\/li>\n<li><strong>Broken Authentication (A07:2021)<\/strong> &#8211; implement rate limiting on login endpoints, enforce strong passwords and use multi-factor authentication<\/li>\n<li><strong>XSS (A03:2021)<\/strong> &#8211; sanitize all input, apply a Content Security Policy (CSP) and encode output according to context<\/li>\n<li><strong>CSRF<\/strong> &#8211; generate unique tokens for every session and verify the Origin\/Referer header in state-changing requests<\/li>\n<li><strong>Security Misconfiguration (A05:2021)<\/strong> &#8211; disable default accounts, remove unnecessary diagnostic endpoints, keep server configuration up to date<\/li>\n<li><strong>Insecure Deserialization<\/strong> &#8211; validate and restrict the types of deserialized objects, prefer data formats such as JSON over native serialization<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Popular web frameworks have built-in protection mechanisms, but they do not automatically guard against everything. A developer has to use them deliberately and understand their limits. Django protects against CSRF by default &#8211; but disabling that mechanism &#8220;for the convenience&#8221; of an API? We have seen it many times. And every time it ended badly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"A_secure_software_development_lifecycle_SDLC\"><\/span>A secure software development lifecycle (SDLC)<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Security built into the <a href=\"https:\/\/www.web-systems.pl\/en\/software-development\/\">software development lifecycle<\/a> is the foundation of what we do at Web Systems. We do not treat it as a separate stage before release. We integrate protective practices into every phase: planning, coding, code reviews, testing, deployment, production maintenance. At the start we define a threat model &#8211; we identify the attack vectors specific to the given business domain. During coding, programmers stick to agreed secure coding patterns. Every change goes through a mandatory code review. No exceptions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Automated security scanners in the CI\/CD pipeline are the first line of defense. SAST (Static Application Security Testing) analyzes the source code for known vulnerability patterns before compilation. It catches potential SQL injection, hardcoded secrets, unsafe use of cryptography. DAST (Dynamic Application Security Testing) tests the running application by simulating attacks from the outside. But &#8211; and let me be honest here &#8211; no automated tool replaces an experienced developer. Scanners produce false positives and miss vulnerabilities that stem from business logic. We treat them as a complement to human analysis, not a substitute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Security-focused code review is a separate skill. Something entirely different from checking whether the business logic is correct. Our reviewers look at input handling, the authorization implementation, secret storage and session management. Then there is dependency management &#8211; we regularly monitor CVE (Common Vulnerabilities and Exposures) databases for vulnerabilities in the libraries we use. Dependabot, Snyk &#8211; these tools automatically notify us about critical flaws. That way we react quickly and update the affected components before anyone exploits them.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Authentication_authorization_and_session_management\"><\/span>Authentication, authorization and session management<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Authentication and authorization are the most exposed element of web application security. Which strategy should you choose? It depends on the project. OAuth 2.0 works great when you need to integrate with external identity providers. Server-side sessions offer simplicity and full control in closed B2B systems. And JWT (JSON Web Tokens)? Hugely popular in microservice architectures, but they carry real risks. A token signed with a weak algorithm or kept in localStorage is a gift to attackers exploiting XSS. At Web Systems we pick the strategy case by case &#8211; we analyze the business requirements, the scale of the system and the threat profile.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Multi-factor authentication (MFA) should be the standard. Especially in systems processing sensitive or financial data. The cost of implementing TOTP (Time-based One-Time Password) or integrating with authenticator apps? Marginal compared with the risk of account takeover through phishing or credential stuffing. In our B2B projects MFA is a default requirement for administrative accounts. We increasingly roll it out for end users too &#8211; progressively. The system asks for a second factor during higher-risk operations, not at every login.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The permission model? It depends on the complexity of the client&#8217;s organizational structure. RBAC (Role-Based Access Control) is enough when you have a fixed, small number of roles &#8211; administrator, moderator, user. But in complex systems where permissions depend on the department, location, time of access or document classification, ABAC (Attribute-Based Access Control) gives you far more flexibility. <strong>Tip:<\/strong> In SPA applications store access tokens in memory (a JavaScript variable) and refresh tokens in HttpOnly cookies with the Secure and SameSite flags. Avoid localStorage &#8211; it is available to every script on the page. With an XSS vulnerability that means an immediate takeover of the user&#8217;s session.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Data_protection_and_GDPR_compliance_in_web_applications\"><\/span>Data protection and GDPR compliance in web applications<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Protecting personal data is not just a tick in the &#8220;GDPR compliant&#8221; checkbox. It is a matter of trust from customers and partners. The foundation? Encryption on two levels. Data in transit &#8211; TLS 1.3 (we disable older versions of the protocol). Data at rest &#8211; encryption at the database or file system level. We store user passwords exclusively as hashes generated with brute-force resistant algorithms &#8211; bcrypt or Argon2id with a properly chosen computational cost. MD5? SHA-256 for passwords? Never. Their computational speed works in the attackers&#8217; favor.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Privacy by design means designing GDPR-compliant systems from the first architecture sketch, not patching an existing system after the fact. What does that look like in our practice? Minimizing the data we collect (we ask ourselves: do we really need this information?), pseudonymization wherever possible, separating identifying data from analytical data. Every operation on personal data is recorded in an immutable audit log &#8211; who did what and when. Such a log helps detect unauthorized access and prove compliance during an inspection by the supervisory authority.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The right to erasure (Article 17 GDPR) is a real challenge in complex B2B systems. A customer&#8217;s personal data spreads across many tables, services and backups. Complete removal requires a well thought out strategy. We use a soft delete pattern with cascading anonymization &#8211; instead of physically deleting records we replace identifying data with irreversible values. We keep the referential integrity of the database and the ability to process aggregated data. We define the retention policy together with the client, and we automate the deletion process itself once the storage period expires. Because nobody can handle that manually.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Monitoring_incident_response_and_continuous_improvement\"><\/span>Monitoring, incident response and continuous improvement<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You deployed the application to production &#8211; and that is it? No. This is where it really begins. Continuous monitoring and readiness to react fast &#8211; there is no way around it. Central security event logging (SIEM) lets you correlate information from different sources: application logs, web server, database, firewall. We configure alerts for mass failed logins (a brute-force attack?), unexpected API traffic patterns (scraping or DDoS?), attempts to access resources without authorization. Monitoring is not about collecting data. It is the ability to pick the signal out of the noise. And there is plenty of noise.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A security incident response plan defines who does what in a crisis. Who decides to cut off a compromised system? Who communicates with the end client? How quickly must the supervisory authority be notified? (GDPR requires reporting a breach within 72 hours.) Those questions should not be asked for the first time when everything is already on fire. We run regular scenario exercises &#8211; we simulate different types of breaches, from a data leak to ransomware. We check how effective the procedures are and shorten the response time. Better to practice than to improvise live.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We run penetration tests and security audits on a cycle &#8211; we adjust the frequency to the risk level of the project. Applications processing financial or medical data? An audit every quarter. Systems with a lower risk profile? Every six months. Between external audits we run continuous automated monitoring &#8211; DAST scanners in the CI\/CD pipeline catch security regressions on the fly, before the code reaches production. And we measure everything: the number of vulnerabilities found, the mean time to repair them (MTTR), code coverage by SAST scans, the share of dependencies with current patches. Regular analysis of these metrics reveals trends and shows where to allocate resources for the biggest effect.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"FAQ_%E2%80%93_frequently_asked_questions_about_web_application_security\"><\/span>FAQ &#8211; frequently asked questions about web application security<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_much_does_comprehensive_security_in_a_web_application_cost\"><\/span>How much does comprehensive security in a web application cost?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It depends on the scale and complexity of the project &#8211; but in our experience security built in from the start increases the development budget by 15-25%. A lot? Not when you compare it with the cost of cleaning up after an incident. Removing vulnerabilities from a running production system can be up to ten times more expensive than preventing them at the design stage. Add GDPR fines, legal costs and lost customers. Security is an investment, not an expense &#8211; a well protected application generates lower maintenance costs and delivers a real competitive edge.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Does_a_small_B2B_application_also_need_advanced_security\"><\/span>Does a small B2B application also need advanced security?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. The scale of an application does not reduce the risk &#8211; smaller systems are often an easier target, because attackers assume weaker protection. Every application processing personal, financial or commercial data needs the basics: encrypted communication, secure authentication, input validation, regular dependency updates. Advanced mechanisms (WAF, SIEM, penetration tests) we choose in proportion to the risk profile. But a minimum level of security? Non-negotiable. Regardless of the size of the project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_often_should_an_application_security_audit_be_carried_out\"><\/span>How often should an application security audit be carried out?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">At least once a year for every production application. Plus an additional review after every major architectural change or the rollout of a new critical feature. High-risk systems &#8211; fintech, medtech, e-commerce with payments &#8211; every quarter. Between external audits, run continuous automated monitoring. DAST scanners in the CI\/CD pipeline catch security regressions on the fly, before the code reaches production.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Web_application_security_is_a_process_not_a_product\"><\/span>Web application security is a process, not a product<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Protecting a web application requires a coherent approach &#8211; thoughtful architecture, a secure development lifecycle, effective monitoring, continuous improvement of procedures. No single tool and no one-off audit will provide lasting security. What you need is an organizational culture in which everyone on the team understands their role in protecting the system. The pillars? Architecture based on separation of concerns, security practices integrated into the SDLC, multi-layered authentication and authorization, GDPR compliance by design, and a metrics-driven approach to monitoring and incident response.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Today security is a genuine competitive advantage. Customers and business partners increasingly check data protection standards before entering into cooperation. Certificates, audit results, a transparent security policy &#8211; these build trust more effectively than any marketing. Investing in proper protection pays off not only by avoiding the cost of incidents. It also makes it easier to win demanding corporate and institutional clients, for whom the security of a technology partner is a precondition of working together.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Are you planning to <a href=\"https:\/\/www.web-systems.pl\/en\/website-and-online-store-development\/\">build a new web application<\/a>? Do you need a security audit of an existing system? Or perhaps you want to modernize the protection of your B2B platform? Get in touch with the Web Systems team. Since 2006 we have been helping companies create solutions that combine business functionality with solid protection standards. We will analyze your project, identify the risks and propose a concrete action plan matched to your budget and priorities.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>At Web Systems we have been building web applications for over twenty years. E-commerce platforms, B2B systems handling thousands of transactions a day, extensive customer portals &#8211; we have been through all of it. And every project teaches us the same lesson: web application security is not a feature you bolt on at the end [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":28232,"comment_status":"","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[816,828,806],"tags":[865,869,901,925,1069,1105,1132],"class_list":["post-28745","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-applications","category-cybersecurity","category-web-development-en","tag-web-applications","tag-it-architecture","tag-security","tag-cybersecurity","tag-owasp-en","tag-gdpr","tag-software-house-en"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts\/28745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/comments?post=28745"}],"version-history":[{"count":0,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/posts\/28745\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/media\/28232"}],"wp:attachment":[{"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/media?parent=28745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/categories?post=28745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.web-systems.pl\/en\/wp-json\/wp\/v2\/tags?post=28745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}