diff --git a/Index.md b/Index.md index 2b92c4f232..cfb1c4efda 100644 --- a/Index.md +++ b/Index.md @@ -184,6 +184,8 @@ [Securing Cascading Style Sheets Cheat Sheet](cheatsheets/Securing_Cascading_Style_Sheets_Cheat_Sheet.md) +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [SQL Injection Prevention Cheat Sheet](cheatsheets/SQL_Injection_Prevention_Cheat_Sheet.md) ![Java](assets/Index_Java.svg) ![Csharp](assets/Index_Csharp.svg) ![Vbnet](assets/Index_Vbnet.svg) [Server Side Request Forgery Prevention Cheat Sheet](cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.md) ![Java](assets/Index_Java.svg) ![Python](assets/Index_Python.svg) ![Ruby](assets/Index_Ruby.svg) ![Bash](assets/Index_Bash.svg) diff --git a/IndexASVS.md b/IndexASVS.md index 73c22eb6a3..6f08d315c3 100644 --- a/IndexASVS.md +++ b/IndexASVS.md @@ -111,6 +111,8 @@ This index is based on the version 5.0.x of the ASVS. ### V1.1 Encoding and Sanitization Architecture +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [Cross Site Scripting Prevention Cheat Sheet](cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.md) ### V1.2 Injection Prevention @@ -313,6 +315,8 @@ None. ### V6.1 Authentication Documentation +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [Credential Stuffing Prevention Cheat Sheet](cheatsheets/Credential_Stuffing_Prevention_Cheat_Sheet.md) ### V6.2 Password Security @@ -393,6 +397,8 @@ None. ### V8.1 Authorization Documentation +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [Authorization Cheat Sheet](cheatsheets/Authorization_Cheat_Sheet.md) [Authorization Testing Automation](cheatsheets/Authorization_Testing_Automation_Cheat_Sheet.md) @@ -469,6 +475,8 @@ None. ### V11.1 Cryptographic Inventory and Documentation +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [Cryptographic Storage Cheat Sheet](cheatsheets/Cryptographic_Storage_Cheat_Sheet.md) [Key Management Cheat Sheet](cheatsheets/Key_Management_Cheat_Sheet.md) @@ -571,6 +579,8 @@ None. ### V15.1: Secure Coding and Architecture Documentation +[Security Terminology Cheat Sheet](cheatsheets/Security_Terminology_Cheat_Sheet.md) + [Abuse Case Cheat Sheet](cheatsheets/Abuse_Case_Cheat_Sheet.md) [Attack Surface Analysis Cheat Sheet](cheatsheets/Attack_Surface_Analysis_Cheat_Sheet.md) diff --git a/cheatsheets/Security_Terminology_Cheat_Sheet.md b/cheatsheets/Security_Terminology_Cheat_Sheet.md new file mode 100644 index 0000000000..b52b5b83db --- /dev/null +++ b/cheatsheets/Security_Terminology_Cheat_Sheet.md @@ -0,0 +1,121 @@ +# Security Terminology Cheat Sheet + +## Introduction + +This cheat sheet provides clear definitions and distinctions for security terminology that is often confused, even by experienced developers. Understanding these terms is critical for correctly implementing security controls and following standards like the [OWASP ASVS](https://owasp.org/www-project-application-security-verification-standard/). + +## Table of Contents + +- [Data Handling: Encoding, Escaping, Sanitization, and Serialization](#data-handling-encoding-escaping-sanitization-and-serialization) +- [Cryptography: Encryption, Hashing, and Signatures](#cryptography-encryption-hashing-and-signatures) +- [Identity: Authentication and Authorization](#identity-authentication-and-authorization) +- [Federated Identity Terms](#federated-identity-terms) +- [References](#references) + +## Data Handling: Encoding, Escaping, Sanitization, and Serialization + +These terms relate to how data is transformed for transport, storage, or display. + +### Encoding + +**Definition:** Transforming data into a different format using a publicly available scheme, so that it can be safely consumed by a different system. + +- **Purpose:** Not for security, but for data usability and compatibility. +- **Reversibility:** Always reversible. +- **Examples:** Base64, URL Encoding, HTML Entity Encoding. +- **Security Context:** Using the wrong encoding can lead to vulnerabilities, but encoding itself is not a security control. + +### Escaping + +**Definition:** A sub-type of encoding where specific characters are prefixed with a "signal" character (like a backslash) to prevent them from being misinterpreted by a parser as control characters. + +- **Purpose:** To ensure the interpreter treats the data as text rather than code/commands. +- **Examples:** `\'` in SQL, `\n` in strings, `<` in HTML. +- **Security Context:** Essential for preventing Injection attacks (XSS, SQLi). + +### Sanitization + +**Definition:** The process of cleaning or filtering input by removing, replacing, or modifying potentially dangerous characters or content. + +- **Purpose:** To make "dirty" input "clean" according to a security policy. +- **Examples:** Stripping `