diff --git a/adev-es/src/content/guide/security.en.md b/adev-es/src/content/guide/security.en.md new file mode 100644 index 0000000..65150b8 --- /dev/null +++ b/adev-es/src/content/guide/security.en.md @@ -0,0 +1,369 @@ +# Security + +This topic describes Angular's built-in protections against common web application vulnerabilities and attacks such as cross-site scripting attacks. +It doesn't cover application-level security, such as authentication and authorization. + +For more information about the attacks and mitigations described below, see the [Open Web Application Security Project (OWASP) Guide](https://www.owasp.org/index.php/Category:OWASP_Guide_Project). + + + + + +Angular is part of Google [Open Source Software Vulnerability Reward Program](https://bughunters.google.com/about/rules/6521337925468160/google-open-source-software-vulnerability-reward-program-rules). For vulnerabilities in Angular, please submit your report at [https://bughunters.google.com](https://bughunters.google.com/report). + +For more information about how Google handles security issues, see [Google's security philosophy](https://www.google.com/about/appsecurity). + + + +## Best practices + +These are some best practices to ensure that your Angular application is secure. + +1. **Keep current with the latest Angular library releases** - The Angular libraries get regular updates, and these updates might fix security defects discovered in previous versions. Check the Angular [change log](https://github.com/angular/angular/blob/main/CHANGELOG.md) for security-related updates. +2. **Don't alter your copy of Angular** - Private, customized versions of Angular tend to fall behind the current version and might not include important security fixes and enhancements. Instead, share your Angular improvements with the community and make a pull request. +3. **Avoid Angular APIs marked in the documentation as "_Security Risk_"** - For more information, see the [Trusting safe values](#trusting-safe-values) section of this page. + +## Preventing cross-site scripting (XSS) + +[Cross-site scripting (XSS)](https://en.wikipedia.org/wiki/Cross-site_scripting) enables attackers to inject malicious code into web pages. +Such code can then, for example, steal user and login data, or perform actions that impersonate the user. +This is one of the most common attacks on the web. + +To block XSS attacks, you must prevent malicious code from entering the Document Object Model (DOM). +For example, if attackers can trick you into inserting a `