[Week 11] Improve the Security of Your System #62
Labels
No labels
operations
simulator api
tests
web app
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
DevOpps/minitwit#62
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
2) Improve the Security of Your System
Based on your security assessment, take steps to improve the security of your system. Briefly report on the steps you took. At a minimum, you should address the following:
A. Firewall
Set up
ufwon your server so that only the ports you actually need are open.ufwand deny all incoming traffic by defaultsudo ufw statusthat no unnecessary ports are exposed-p), Docker bypassesufwand opens ports directly viaiptables. Test that your firewall actually blocks what you think it blocks.B. TLS
Set up TLS so your application is served over HTTPS.
See the TLS Tutorial for a step-by-step guide.
C. Harden Your Containers
USERdirective in Dockerfile)docker scoutorsnyk container teston your images and address critical/high findingspython:3.9.2-bustervspython:3.12)D. Enhance your CI Pipelines with multiple security related static analysis tools
Add at least one static analysis tool that scans for security vulnerabilities in your application code.
That is, add a tool like Security Code Scan, CodeQL, or Semgrep with enabled security rules to your CI pipeline.
At a later build stage, add at least one other Docker image vulnerability scanner like Trivy, Docker Scout, or Snyk to your CI pipeline.
Integrate such tools, so that build, delivery, and deployment get aborted as early as possible in a meaningful way, i.e., shift-left security.