ɪᴛ'ꜱ ᴀ ᴛᴇʀʀɪʙʟᴇ ᴡᴏʀᴅ, ᴡɪᴛʜ ᴘʀɪᴍᴀʀɪʟʏ ɴᴇɢᴀᴛɪᴠᴇ ᴄᴏɴɴᴏᴛᴀᴛɪᴏɴꜱ. ɪ ᴄᴏɴꜱɪᴅᴇʀ ɪᴛ ᴛᴏ ʙᴇ ᴀ ʀᴇꜰʟᴇᴄᴛɪᴏɴ ᴏꜰ ᴛʜᴇ ᴍᴇɴᴛᴀʟɪᴛʏ ᴏꜰ ᴊᴀᴠᴀꜱᴄʀɪᴘᴛ ᴅᴇᴠᴇʟᴏᴘᴇʀꜱ:
● The term "injection" has several distinct meanings in computer science:
*1. Security Vulnerabilities (Code Injection)*
Malicious input that gets executed as code:
- SQL Injection: Inserting SQL commands through user input to manipulate databases
- Command Injection: Inserting shell commands through application input
- XSS (Cross-Site Scripting): Injecting JavaScript into web pages viewed by others
- LDAP/XML/Header Injection: Similar attacks targeting other interpreters
2. Dependency Injection (DI)
A design pattern where dependencies are provided to objects rather than created internally:
// Without DI - tightly coupled
class UserService {
private db = new Database(); // creates its own dependency
}
// With DI - loosely coupled
class UserService {
constructor(private db: Database) {} // dependency injected
}
This is fundamental to Angular (which this project uses), Spring, and other frameworks.
3. Script/Code Injection (Legitimate)
Intentionally inserting code into a process or page:
- Browser extension content scripts: Injecting scripts into web pages (as this project does with plebian-signer-extension.ts)
- DLL injection: Loading libraries into running processes
- Hooking/Patching: Modifying program behavior at runtime
*4. Fault Injection*
Deliberately introducing errors to test system resilience and error handling.
*5. Packet Injection*
Inserting crafted network packets into a data stream (used in network testing and attacks).