Table of Content
- Web Security
- Cryptography
- Authentication
- API
- Cross-site scripting (XSS)
- SQL Injections
- Content Security Policy
- Same-Origin Policy
- XPATH Injection
- HTTP Security
- Unicode Normalisation Vulnerability
- Typosquatting
Minimum Viable Security (MVS):
- Start early
- Shift-left
- Iterative work
Security Categories:
Secret Detection: Your data
To detect secrets in various formats:
- Passwords
- Access keys
- API tokens
- Credit card numbers
Secret detection can prevent fraudulent use of credentials that were committed accidentally
Tools:
- gitleaks by Zachary Rice
- git-secrets by AWS
- detect-secrets by Yelp
Dependency Check (SCA): Your libraries
To detect open source components with known vulnerabilities
Tools for Python:
- OWASP dependency-check
- Safety by Pyup.io
- Jake by Sonatype
Infrastructure Misconfiguration: Your infrastructure
Container Scanning: Your packaging
Runtime Scanning: Your runtime
-5 Security Tools All Developers Should Know About
XPATH Injection
Static Analysis Security Testing (SAST)
Static Code Analysis
What is Static Code Analysis?
- Predicting defects in code without running it
How Static Code Analysis tools work?
- At the core of most popular static analysis libraries is the concept of an Abstract Syntax Tree, or AST for short. An AST is a representation of source code as a tree structure: each source file is a root node, and root-level constructs declared in the file are child nodes of that node. Those child nodes can each have child nodes within them
Some of the Static Code Analyses are:
There are many Static Code Analyses for different languages
As JavaScript is a dynamically typed language, we can use ESLint (linter) and Prettier (formatter) to catch most of the errors
Flow from Facebook is a Static type checker. It can be used alongside linters and formatters to catch more bugs
TypeScript extends JavaScript by adding types
Checkmarx
,JFROG XRAY
are some of the other tools
What are the other techniques to find bugs?
Code Coverage Tools - Code coverage provides information about whether, and optionally how often certain parts of an application have been executed. It's commonly used to determine how thoroughly a test suite exercises a particular codebase. JestJS is a testing framework for JavaScript with code coverage
Software Composition Analysis - Identify Vulnerabilities In Open Source Libraries used as dependencies in the project. RetireJS is one such tool for JavaScript
Software Composition Analysis (SCA)
- Artifactory X-ray
- SonarCube
- Snyk
References
Insecure apps for testing:
- Juice Shop
- WebGoat: A Java based deliberately insecure application and companion app WebWolf
Books:
The Web Application Hacker's Handbook: Finding and Exploiting Security Flaws (ISBN-13: 978-1118026472) (2011)
Alice and Bob Learn Application Security by Tanya Janca (ISBN-13: 978-1119687351) (2020)