Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Security in DevOps

You're reading from   Hands-On Security in DevOps Ensure continuous security, deployment, and delivery with DevSecOps

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher
ISBN-13 9781788995504
Length 356 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Tony Hsiang-Chih Hsu Tony Hsiang-Chih Hsu
Author Profile Icon Tony Hsiang-Chih Hsu
Tony Hsiang-Chih Hsu
Arrow right icon
View More author details
Toc

Table of Contents (23) Chapters Close

Preface 1. DevSecOps Drivers and Challenges FREE CHAPTER 2. Security Goals and Metrics 3. Security Assurance Program and Organization 4. Security Requirements and Compliance 5. Case Study - Security Assurance Program 6. Security Architecture and Design Principles 7. Threat Modeling Practices and Secure Design 8. Secure Coding Best Practices 9. Case Study - Security and Privacy by Design 10. Security-Testing Plan and Practices 11. Whitebox Testing Tips 12. Security Testing Toolkits 13. Security Automation with the CI Pipeline 14. Incident Response 15. Security Monitoring 16. Security Assessment for New Releases 17. Threat Inspection and Intelligence 18. Business Fraud and Service Abuses 19. GDPR Compliance Case Study 20. DevSecOps - Challenges, Tips, and FAQs 21. Assessments 22. Other Books You May Enjoy

Input validation and sanitization

Input validation is like the perimeter security control of the whole application. The input not only includes data input from users but also covers the parameters passing between function calls, methods, APIs, or systems. The concept of validation covers various kinds of technical approaches:

Techniques

Purpose

Example

Canonicalization Normalization

Process input data into known or expected form.

  • URL decode/encode
  • File path or names handling
Sanitization

Sanitization is to remove illegal characters or make potentially risky data safe. Always sanitize an output to avoid XSS.

  • Escape: replace < > ' " & with HTML entities.
Validation

To check if the input is valid or within the constraint data type, length, and so on.

  • IsAlpha, isCreditCard, isDecimal, isIP

The right order of implementation...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime