A security portfolio is not a trophy case. It is a structured body of evidence that shows what you can do, how you think, and what you have actually built or investigated. This guide walks through what belongs in a cybersecurity portfolio, how to choose and document projects, and a reproducible lab to create one from an empty directory.
Why a security portfolio matters
When you apply for a security role without prior experience, your résumé tells a hiring manager what you claim to know. A portfolio shows what you have actually done. The difference is substantial.
Recruiters and hiring managers in cybersecurity look for demonstrated ability to identify problems, implement solutions, test results, and document findings. A GitHub profile full of forked repositories with no commits does not demonstrate this. A single well-documented project that explains the problem, the approach, the tools, the validation, and the outcome does.
A portfolio also forces you to learn more deeply. Writing a clear explanation of a project reveals gaps in your understanding. If you cannot explain why you chose a specific tool or what a test result means, you have found something to study next.
This article does not promise that a portfolio guarantees employment. It explains how to build one that honestly represents your skills and gives reviewers the evidence they need to evaluate you.
What a cybersecurity portfolio actually is
A cybersecurity portfolio is a curated collection of project documentation, code, diagrams, and written explanations that demonstrate your technical abilities and security reasoning. It is not:
- A list of tools you have heard of
- A collection of certificates without supporting work
- A personal blog with only opinions
- A copy of your résumé in web format
It is a body of work that a reviewer can examine to answer: Can this person identify a security problem, choose appropriate tools, implement a solution, validate it, and explain the result?
Portfolio vs CV vs GitHub profile vs personal website
These four things serve different purposes and often get confused.
| Artifact | Purpose | Audience | Update frequency |
|---|---|---|---|
| CV/Résumé | Summary of education, experience, certifications, and key skills | Recruiters, ATS systems, hiring managers | Per application |
| GitHub profile | Code repositories, contribution graph, pinned projects | Technical reviewers, engineers | Continuous |
| Personal website | Narrative control, contact, long-form writing, project case studies | Anyone searching your name | Occasional |
| Security portfolio | Structured evidence of security-specific projects with documentation | Technical interviewers, hiring managers | Per project |
A GitHub profile can serve as your portfolio if you organize it deliberately: consistent repository names, clear READMEs, architecture diagrams, and meaningful commit history. A personal website is optional but useful for narrative control and long-form case studies. The portfolio is the content; GitHub and a website are distribution channels.
What should a security portfolio contain?
A professional security portfolio has five core sections. Each serves a distinct purpose.
A. Professional introduction
A short professional summary (3–5 sentences) that covers:
- Your current focus (e.g., “DevSecOps engineer specializing in CI/CD security and container hardening”)
- Technical interests (cloud security, application security, detection engineering, etc.)
- 3–5 core skills you can demonstrate with projects
- Career direction (what roles you are targeting)
- Links to GitHub, LinkedIn, and any personal site
How to write it credibly: Avoid “passionate,” “driven,” “expert,” or “mastery.” Instead, state what you have built. “I have built three CI/CD pipelines with integrated secret scanning, dependency scanning, and image scanning using GitHub Actions and Trivy” is verifiable. “I am passionate about DevSecOps” is not.
B. Technical skills
Organize skills into meaningful categories rather than a flat list of tools. Example categories:
| Category | Example skills |
|---|---|
| Linux and networking | System hardening, netfilter/iptables, DNS, TLS, packet analysis |
| Cloud platforms | AWS IAM, S3 security, Azure RBAC, GCP organization policies |
| DevOps and DevSecOps | GitHub Actions, GitLab CI, Jenkins, pre-commit hooks |
| Application security | SAST, DAST, dependency scanning, threat modeling |
| Vulnerability assessment | Nessus, OpenVAS, Trivy, Grype, manual verification |
| Security automation | Python scripting, Bash, Ansible, Sigma rules |
| Containers and Kubernetes | Docker hardening, Falco, Kyverno, admission controllers |
| CI/CD security | SLSA, Sigstore, SBOM generation, artifact signing |
| Scripting and programming | Python, Go, Bash, PowerShell, YAML/JSON |
Key principle: Every skill category should have at least one project that demonstrates it. A long list of tools without evidence is less useful than three categories each backed by a documented project.
C. Projects
This is the core of the portfolio. Each project should demonstrate:
- Problem identification — What security issue were you addressing?
- Technical implementation — What did you build or configure?
- Security reasoning — Why did you choose this approach over alternatives?
- Testing and validation — How did you prove it works?
- Documentation — Can someone else understand and reproduce it?
- Lessons learned — What would you do differently?
Choosing projects
Select projects that show breadth across categories and depth in at least one. Do not try to complete every project type. Three well-documented projects are more useful than twelve empty repositories.
Beginner-friendly examples:
| Project | Category | Skills demonstrated |
|---|---|---|
| Linux server hardening lab | Linux/Networking | CIS benchmarks, auditd, SSH hardening, fail2ban |
| Vulnerability scanning and remediation | Vulnerability assessment | Nessus/OpenVAS/Trivy, CVSS prioritization, patch verification |
| Docker image security scanning | Containers/DevSecOps | Trivy, Hadolint, distroless images, non-root user |
Intermediate examples:
| Project | Category | Skills demonstrated |
|---|---|---|
| GitHub Actions security pipeline | DevSecOps/CI/CD | Gitleaks, Trivy, dependency review, SBOM |
| Terraform infrastructure security | Cloud/IaC | Checkov, tfsec, least-privilege IAM, module design |
| Kubernetes security configuration | Containers/Kubernetes | RBAC, network policies, Pod Security Standards, Kyverno |
Advanced examples:
| Project | Category | Skills demonstrated |
|---|---|---|
| AWS IAM least-privilege lab | Cloud security | Access Analyzer, policy generation from CloudTrail, condition keys |
| Secret scanning with Gitleaks | DevSecOps/Application security | Custom rules, pre-commit, CI integration, false positive handling |
| SAST/DAST/dependency scanning pipeline | Application security | Semgrep, OWASP ZAP, Dependabot, result triage |
| Security monitoring and alerting | Detection engineering | Sigma rules, Splunk/Elastic, alert tuning, runbooks |
D. Evidence and documentation
Each project needs evidence that a reviewer can examine. Useful evidence includes:
- Architecture diagrams — Show data flow, trust boundaries, and components
- Sanitized terminal output — Show commands and results without sensitive data
- Screenshots — Dashboard views, scanner results, before/after comparisons
- Configuration examples — Annotated config files (Dockerfile, workflow, Terraform)
- Test results — Scanner output, unit test results, validation scripts
- Before-and-after comparisons — Policy before/after, scan results before/after
- README documentation — The project’s primary entry point
- Lessons learned — Honest reflection on what worked and what did not
What must not be uploaded:
- Real API keys, cloud credentials, or passwords
- Private IP ranges or internal infrastructure details
- Customer data or PII
- Proprietary company source code
- Sensitive logs containing authentication tokens or internal hostnames
- Any data covered by NDA or employer policy
When in doubt, sanitize or omit. A diagram with generic labels (“App Server,” “Database,” “Load Balancer”) is better than a real architecture with internal hostnames.
E. Learning and certifications
List certifications and relevant courses accurately:
- Certification name, issuing body, date earned, expiration (if applicable)
- Relevant coursework with completion dates
- Do not list in-progress certifications as completed
- Never invent certifications, badges, or completion dates
Certifications support project evidence but do not replace it. A Security+ certification plus a documented vulnerability scanning project is stronger than the certification alone.
The one-paragraph project explanation formula
This is a reusable structure for explaining any security project in a single paragraph that covers all essential elements. Use it in READMEs, interviews, and portfolio case studies.
The five elements
- Problem — What specific security problem were you trying to solve?
- Approach — What did you build, configure, or investigate?
- Tools — Which technologies did you use and why?
- Validation — How did you test the result and what evidence exists?
- Outcome — What changed, what did you learn, and what are the limitations?
The template
I built a [project type] to address [specific problem]. I used [tools and technologies] to implement [important technical approach]. I validated the solution by [tests or evidence], which demonstrated [actual result]. During the project, I learned [specific lesson] and identified [limitation or next improvement].
Four illustrative examples
Example 1 — Linux server hardening I built a Linux server hardening lab to address the problem of default configurations exposing unnecessary attack surface. I used CIS Benchmarks, auditd, and fail2ban to implement SSH key-only authentication, disabled unused services, configured kernel parameters, and set up log monitoring. I validated the solution by running Lynis and OpenSCAP scans before and after hardening, which demonstrated a reduction in high-severity findings from 23 to 3. During the project, I learned that auditd rule ordering significantly affects performance and identified that automated remediation would be needed for fleet management as a next improvement.
Example 2 — Docker image security scanning I built a Docker image security scanning pipeline to address vulnerable base images and misconfigurations reaching the container registry. I used Trivy, Hadolint, and distroless base images in a GitHub Actions workflow to implement multi-stage scanning: filesystem scan at build, image scan before push, and configuration linting. I validated the solution by intentionally introducing a known CVE and a root-user Dockerfile, both of which the pipeline blocked. During the project, I learned that distroless images break some debugging workflows and identified that SBOM generation would improve supply chain visibility as a next improvement.
Example 3 — CI/CD pipeline security I built a CI/CD security pipeline to address secrets, vulnerable dependencies, and insecure infrastructure code reaching production. I used GitHub Actions with Gitleaks, Trivy, and Checkov to implement secret scanning on every push, dependency and container scanning on pull requests, and Terraform policy checks on infrastructure changes. I validated the solution by committing a test AWS key (which Gitleaks caught), introducing a vulnerable npm package (which Trivy flagged), and writing an over-permissive security group (which Checkov blocked). During the project, I learned that failing the build on all severities creates alert fatigue and identified that automated dependency updates would reduce manual triage as a next improvement.
Example 4 — AWS IAM least-privilege lab I built an AWS IAM least-privilege lab to address over-permissive roles in a simulated application environment. I used the AWS CLI, IAM Access Analyzer, and a custom Python wildcard scanner to implement iterative policy refinement: identify wildcards, replace with specific actions and resources, test with the application, and repeat. I validated the solution by confirming the application functioned with the tightened policy and that Access Analyzer reported no findings. During the project, I learned that
iam:PassRolewith a wildcard resource is a common privilege escalation path and identified that policy generation from CloudTrail would scale better than manual refinement as a next improvement.
These are illustrative examples, not personal achievements or verified test results. Replace the details with your own real project information. If your scan found 7 vulnerabilities instead of 23, write 7. If you did not use Access Analyzer, omit it.
Common portfolio mistakes
| Mistake | Why it matters | Fix |
|---|---|---|
| Empty repositories with only a README | Shows no implementation | Add code, configs, diagrams, or remove the repo |
| Listing tools without context | Anyone can copy a tool list | Explain how you used each tool in a project |
| Screenshots with real credentials/names | Security risk, shows poor judgment | Sanitize all outputs before publishing |
| No validation evidence | Unverified claims | Include test output, scan results, before/after |
| Claiming “expert” or “mastery” | Undermines credibility | Use “implemented,” “configured,” “investigated” |
| Copying project descriptions from tutorials | Shows no original understanding | Write in your own words, include your specific results |
| Dozens of shallow projects | Dilutes signal | Focus on 3–5 deep, well-documented projects |
| No lessons learned or limitations | Suggests lack of reflection | Add honest reflection to every project |
Security and privacy considerations
Before publishing any portfolio content:
- Scan for secrets — Run Gitleaks, TruffleHog, or git-secrets on every repository
- Review all screenshots — Blur or redact hostnames, IPs, account IDs, keys
- Check configuration files — Replace real values with placeholders (
<YOUR_BUCKET>,arn:aws:iam::123456789012:role/ExampleRole) - Verify no proprietary code — Do not include employer code, even if “generic”
- Respect NDAs — If you worked on a project under NDA, you cannot publish it without permission
- Use personal accounts — Build labs in personal cloud accounts with billing alerts, not employer accounts
When documenting a project done for an employer (with permission), generalize the architecture. “A microservices application with an API gateway, three services, and a PostgreSQL database” reveals no sensitive details.
How to publish and maintain the portfolio
GitHub-based portfolio (recommended starting point)
- Professional profile README — Create a
username/usernamerepository with a profile README that summarizes your focus, skills, and links to pinned projects - Consistent repository naming — Use
kebab-casenames:linux-hardening-lab,docker-security-pipeline,aws-iam-least-privilege - Clear repository descriptions — One sentence: “Linux server hardening lab implementing CIS Benchmarks with auditd and fail2ban”
- Pinned repositories — Pin your 4–6 best projects
- Project READMEs — Every project repository has a comprehensive README (see template below)
- Meaningful commit history — Commit incrementally with descriptive messages, not one “initial commit”
- Screenshots and diagrams — Store in a
docs/orassets/folder in each repo
Personal portfolio website (optional)
A simple static site with:
- Homepage with professional introduction
- About page with skills and background
- Project case studies (one page per project)
- Certifications page
- Contact links (GitHub, LinkedIn, email)
You do not need a custom domain or paid hosting. GitHub Pages, Cloudflare Pages, or Netlify work well for static sites. A well-organized GitHub profile is often sufficient for early-career roles.
Maintenance
- Update project READMEs when you improve a project
- Add new projects as you complete them
- Remove or archive outdated projects
- Re-validate links quarterly
- Run secret scans before pushing
Practical portfolio-building lab: Build from an empty folder
This lab creates a professional portfolio structure on your local machine using only Git and Markdown. No cloud accounts, no paid tools, no external dependencies.
Prerequisites
- Git installed (
git --version) - A text editor (VS Code, Vim, Nano, etc.)
- Terminal/command line access
Step 1: Create the directory structure
Run these commands in your terminal:
# Create the root portfolio directory
mkdir -p security-portfolio
cd security-portfolio
# Create the full directory tree
mkdir -p about skills projects certifications diagrams screenshots templates
# Create project subdirectories (add more as needed)
mkdir -p projects/linux-hardening projects/docker-security projects/ci-cd-security
# Verify structure
find . -type f -o -type d | sort
Expected output:
.
./about
./certifications
./diagrams
./projects
./projects/ci-cd-security
./projects/docker-security
./projects/linux-hardening
./skills
./screenshots
./templates
Step 2: Create the main README
Create README.md in the root:
cat > README.md << 'EOF'
# Security Portfolio
Professional cybersecurity portfolio demonstrating hands-on skills in cloud security, DevSecOps, and application security.
## Structure
- [`about/`](about/) — Professional introduction and background
- [`skills/`](skills/) — Technical skills organized by category with project evidence
- [`projects/`](projects/) — Documented security projects with implementation details
- [`certifications/`](certifications/) — Certifications and relevant coursework
- [`diagrams/`](diagrams/) — Architecture and workflow diagrams
- [`screenshots/`](screenshots/) — Sanitized screenshots and scan results
- [`templates/`](templates/) — Reusable documentation templates
## Projects
| Project | Category | Key Skills |
|---------|----------|------------|
| [Linux Hardening Lab](projects/linux-hardening/) | Linux/Networking | CIS Benchmarks, auditd, SSH hardening, Lynis |
| [Docker Security Pipeline](projects/docker-security/) | Containers/DevSecOps | Trivy, Hadolint, distroless, GitHub Actions |
| [CI/CD Security Pipeline](projects/ci-cd-security/) | DevSecOps/CI/CD | Gitleaks, Checkov, Trivy, SBOM generation |
## Contact
- GitHub: [github.com/yourusername](https://github.com/yourusername)
- LinkedIn: [linkedin.com/in/yourname](https://linkedin.com/in/yourname)
- Email: your.email@example.com
---
*This portfolio is continuously updated. Last updated: 2026-11-18*
EOF
Step 3: Create the professional introduction
Create about/introduction.md:
cat > about/introduction.md << 'EOF'
# Professional Introduction
## Summary
DevSecOps engineer specializing in CI/CD security, container hardening, and cloud infrastructure security. I build automated security pipelines that catch vulnerabilities before they reach production, and I document every project so others can reproduce and learn from it.
## Technical Interests
- **CI/CD Security**: Secret scanning, dependency scanning, container image scanning, SBOM generation
- **Container Security**: Distroless images, runtime security (Falco), Kubernetes hardening (Kyverno, Pod Security Standards)
- **Cloud Security**: AWS IAM least privilege, Terraform security (Checkov, tfsec), infrastructure as code
- **Application Security**: SAST/DAST integration, threat modeling, secure code review
## Core Skills (with Project Evidence)
| Skill | Evidence Project |
|-------|------------------|
| CI/CD security pipeline design | [CI/CD Security Pipeline](projects/ci-cd-security/) |
| Container image hardening | [Docker Security Pipeline](projects/docker-security/) |
| Linux system hardening | [Linux Hardening Lab](projects/linux-hardening/) |
| Infrastructure as code security | [CI/CD Security Pipeline](projects/ci-cd-security/) |
| Vulnerability assessment and remediation | [Linux Hardening Lab](projects/linux-hardening/) |
## Career Direction
Targeting junior DevSecOps engineer, cloud security engineer, or application security engineer roles where I can apply pipeline automation and infrastructure security skills.
## Links
- GitHub: https://github.com/yourusername
- LinkedIn: https://linkedin.com/in/yourname
- Portfolio: https://yourusername.github.io/security-portfolio/ (if using GitHub Pages)
---
*Replace all placeholder content with your actual information.*
EOF
Step 4: Create the technical skills document
Create skills/technical-skills.md:
cat > skills/technical-skills.md << 'EOF'
# Technical Skills
Skills are organized by category. Each category includes at least one project that demonstrates the skill.
## Linux and Networking
- System hardening (CIS Benchmarks, Lynis, OpenSCAP)
- SSH configuration and key management
- Auditd rule creation and log analysis
- Firewall management (iptables/nftables, ufw)
- Network troubleshooting (tcpdump, ss, ip)
- **Evidence**: [Linux Hardening Lab](projects/linux-hardening/)
## Cloud Platforms
- AWS: IAM policies, S3 security, CloudTrail, Config, Security Hub
- Azure: RBAC, Policy, Defender for Cloud
- GCP: Organization policies, IAM conditions, Security Command Center
- **Evidence**: [CI/CD Security Pipeline](projects/ci-cd-security/) (Terraform AWS modules)
## DevOps and DevSecOps
- GitHub Actions: Workflow design, reusable workflows, OIDC authentication
- GitLab CI: Pipeline templates, security scanning integration
- Pre-commit hooks: Gitleaks, Hadolint, checkov
- Artifact signing: Cosign, Sigstore
- SBOM generation: Syft, CycloneDX
- **Evidence**: [CI/CD Security Pipeline](projects/ci-cd-security/), [Docker Security Pipeline](projects/docker-security/)
## Application Security
- SAST: Semgrep, CodeQL, SonarQube
- DAST: OWASP ZAP, Nikto
- Dependency scanning: Dependabot, Trivy, Grype, npm audit
- Threat modeling: STRIDE, attack trees
- **Evidence**: [CI/CD Security Pipeline](projects/ci-cd-security/)
## Vulnerability Assessment
- Scanner configuration: Nessus, OpenVAS, Trivy, Grype
- CVSS scoring and prioritization
- Patch verification and regression testing
- False positive triage
- **Evidence**: [Linux Hardening Lab](projects/linux-hardening/)
## Security Automation
- Python: Requests, Boto3, PyYAML, Click
- Bash: Scripting, text processing, automation
- Ansible: Playbooks, roles, vault
- Sigma rule writing for detection engineering
- **Evidence**: All projects include automation scripts
## Containers and Kubernetes
- Docker: Multi-stage builds, distroless, non-root, Hadolint
- Kubernetes: RBAC, Network Policies, Pod Security Standards
- Runtime security: Falco, Tracee
- Admission control: Kyverno, OPA Gatekeeper
- **Evidence**: [Docker Security Pipeline](projects/docker-security/)
## CI/CD Security
- Secret scanning: Gitleaks, TruffleHog
- Supply chain: SLSA, in-toto, provenance
- Pipeline hardening: Least privilege runners, branch protection
- Policy as code: OPA, Rego
- **Evidence**: [CI/CD Security Pipeline](projects/ci-cd-security/)
## Scripting and Programming
- Python (proficient): CLI tools, API integrations, data processing
- Go (learning): CLI tools, concurrent processing
- Bash (proficient): Automation, system administration
- PowerShell (basic): Windows administration
- YAML/JSON: Configuration, manifests, policies
- **Evidence**: All projects include scripts in Python and Bash
---
*Update this document as you add projects. Each skill should map to a project.*
EOF
Step 5: Create the reusable project README template
Create templates/project-template.md:
cat > templates/project-template.md << 'EOF'
# Project Title
## Overview
**One-sentence summary:** What this project does and what security problem it addresses.
**Status:** [Complete / In Progress / Archived]
**Date started:** YYYY-MM-DD
**Date completed:** YYYY-MM-DD (if applicable)
**Repository:** [Link to GitHub repo if published]
---
## Problem Statement
Describe the specific security problem this project addresses. Be concrete.
- What vulnerability, misconfiguration, or gap exists?
- Why does it matter? (Impact if exploited)
- What environment does it apply to? (Cloud, on-prem, container, application)
---
## Objectives
List the specific goals of this project. Each should be measurable.
- [ ] Objective 1 (e.g., "Implement secret scanning on all pull requests")
- [ ] Objective 2 (e.g., "Reduce critical container vulnerabilities to zero")
- [ ] Objective 3 (e.g., "Achieve CIS Level 1 compliance on test server")
---
## Architecture / Workflow
Include a diagram (Mermaid, draw.io, or image in `../diagrams/`).
```mermaid
graph TD
A[Source Code] --> B[Pre-commit Hooks]
B --> C[CI Pipeline]
C --> D[Secret Scan]
C --> E[Dependency Scan]
C --> F[Container Scan]
C --> G[IaC Scan]
D --> H[Policy Gate]
E --> H
F --> H
G --> H
H --> I[Deploy / Block]
Description: Explain the flow, trust boundaries, and decision points.
Tools and Technologies
| Tool | Purpose | Version | Why this tool? |
|---|---|---|---|
| Trivy | Container/FS scanning | 0.48+ | Comprehensive vulnerability DB, SBOM support |
| Gitleaks | Secret detection | 8.18+ | Low false positives, custom rules |
| Checkov | IaC scanning | 3.0+ | Broad framework support, custom policies |
Add or remove rows as needed.
Implementation Steps
Document the key steps so someone else could reproduce this.
Step 1: [Name]
Description of what you did. Include commands or configuration snippets.
# Example command
trivy fs --severity HIGH,CRITICAL .
Step 2: [Name]
…
Step 3: [Name]
…
Configuration Examples
Include key configuration files. Sanitize any real values.
.github/workflows/security.yml
name: security
on: [pull_request, push]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Trivy
uses: aquasecurity/trivy-action@master
with:
scan-type: fs
severity: CRITICAL,HIGH
Dockerfile
FROM gcr.io/distroless/nodejs20-debian12
WORKDIR /app
COPY --from=builder /app/dist ./dist
USER nonroot:nonroot
CMD ["dist/index.js"]
Testing and Validation
How did you verify the implementation works?
| Test | Method | Expected Result | Actual Result | Evidence |
|---|---|---|---|---|
| Secret detection | Commit fake AWS key | Pipeline fails | Pipeline failed | screenshots/gitleaks-catch.png |
| Vulnerability scan | Introduce CVE-2023-XXXX | Trivy flags CRITICAL | Flagged | screenshots/trivy-cve.png |
| IaC policy check | Public S3 bucket in TF | Checkov fails | Failed | screenshots/checkov-s3.png |
Results
Summarize what the project achieved. Use specific, truthful metrics.
- Finding X: Description and severity
- Remediation: What was fixed
- Metrics: e.g., “Reduced critical container vulnerabilities from 12 to 0”
- Limitations: What the project does NOT cover
Screenshots and Diagrams
Reference files in ../screenshots/ and ../diagrams/.
../screenshots/project-name-pipeline-success.png— Successful pipeline run../screenshots/project-name-vuln-found.png— Vulnerability detection example../diagrams/project-name-architecture.drawio— Architecture diagram source
Challenges Encountered
Document real difficulties. This shows problem-solving ability.
-
Challenge: Description of the problem Resolution: How you solved it Lesson: What you learned
-
Challenge: … Resolution: … Lesson: …
Lessons Learned
- Technical lesson 1
- Technical lesson 2
- Process lesson (e.g., “Failing on all severities creates alert fatigue; start with CRITICAL/HIGH only”)
Limitations
Be honest about what this project does not do.
- Does not cover: Runtime threat detection
- Does not cover: Supply chain provenance verification
- Tested only on: Ubuntu 22.04, GitHub Actions
- Not tested on: GitLab CI, Azure DevOps, self-hosted runners
Future Improvements
- Add SBOM generation with Syft
- Integrate Cosign for artifact signing
- Add custom Semgrep rules for internal patterns
- Implement automated dependency updates with Dependabot
References
One-Paragraph Summary
I built a [project type] to address [specific problem]. I used [tools and technologies] to implement [important technical approach]. I validated the solution by [tests or evidence], which demonstrated [actual result]. During the project, I learned [specific lesson] and identified [limitation or next improvement].
Replace the bracketed sections with your project’s actual details. This paragraph goes at the top of your GitHub repository description and in your portfolio index. EOF
### Step 6: Create a sample project README
Create `projects/linux-hardening/README.md`:
```bash
cat > projects/linux-hardening/README.md << 'EOF'
# Linux Server Hardening Lab
## Overview
**One-sentence summary:** A hands-on lab implementing CIS Benchmarks Level 1 hardening on Ubuntu 22.04 with auditd monitoring and automated compliance checking.
**Status:** Complete
**Date started:** 2026-10-15
**Date completed:** 2026-10-28
**Repository:** https://github.com/yourusername/linux-hardening-lab
---
## Problem Statement
Default Linux installations include unnecessary services, permissive configurations, and minimal logging. Attackers routinely exploit these defaults for initial access, persistence, and privilege escalation. This lab addresses the need for a repeatable, documented hardening baseline.
---
## Objectives
- [x] Apply CIS Ubuntu 22.04 Level 1 Benchmark controls
- [x] Configure SSH for key-only authentication and disable root login
- [x] Implement auditd rules for critical system calls and file access
- [x] Deploy fail2ban for SSH brute-force protection
- [x] Automate compliance verification with Lynis and OpenSCAP
- [x] Document all changes with before/after evidence
---
## Architecture / Workflow
```mermaid
graph TD
A[Fresh Ubuntu 22.04 VM] --> B[Snapshot: Baseline]
B --> C[Apply Hardening Script]
C --> D[Configure auditd]
D --> E[Configure fail2ban]
E --> F[Run Lynis Scan]
F --> G[Run OpenSCAP Scan]
G --> H[Compare Results]
H --> I[Snapshot: Hardened]
Description: The lab uses a fresh VM, applies hardening through a combination of manual configuration and scripts, then validates with two independent scanners. Snapshots allow rollback and comparison.
Tools and Technologies
| Tool | Purpose | Version | Why this tool? |
|---|---|---|---|
| CIS Benchmarks | Hardening standard | Ubuntu 22.04 L1 v2.0.0 | Industry-recognized, specific controls |
| Lynis | Compliance auditing | 3.0.9 | Fast, detailed, machine-readable output |
| OpenSCAP | SCAP compliance | 1.3.8 | OVAL/XCCDF standards, government baseline |
| auditd | Linux auditing | 3.0.7 | Kernel-level syscall monitoring |
| fail2ban | Intrusion prevention | 1.0.2 | Log-based automatic blocking |
Implementation Steps
Step 1: Baseline snapshot
# In hypervisor (VirtualBox/VMware), snapshot the fresh VM
# Record initial Lynis score
lynis audit system --quick
Step 2: SSH hardening
# /etc/ssh/sshd_config changes
PermitRootLogin no
PubkeyAuthentication yes
PasswordAuthentication no
PermitEmptyPasswords no
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
# Restart SSH
sudo systemctl restart sshd
Step 3: auditd rules
# /etc/audit/rules.d/hardening.rules
# Monitor identity changes
-w /etc/passwd -p wa -k identity
-w /etc/group -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/sudoers -p wa -k scope
# Monitor privilege escalation
-a always,exit -F arch=b64 -S execve -C uid!=euid -k priv_esc
# Monitor network changes
-a always,exit -F arch=b64 -S sethostname -S setdomainname -k network_mod
Step 4: fail2ban configuration
# /etc/fail2ban/jail.local
[sshd]
enabled = true
port = ssh
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
bantime = 3600
findtime = 600
Step 5: Kernel parameters
# /etc/sysctl.d/99-hardening.conf
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.tcp_syncookies = 1
kernel.kptr_restrict = 2
kernel.dmesg_restrict = 1
Step 6: Validation scans
# Lynis
lynis audit system --profile ./custom.prf --report-file lynis-report.txt
# OpenSCAP
oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_cis \
--results results.xml /usr/share/xml/scap/ssg/content/ssg-ubuntu2204-ds.xml
oscap xccdf generate report results.xml > report.html
Configuration Examples
hardening-script.sh (excerpt)
#!/bin/bash
set -euo pipefail
# Disable unused filesystems
echo "install cramfs /bin/true" > /etc/modprobe.d/cramfs.conf
echo "install freevxfs /bin/true" > /etc/modprobe.d/freevxfs.conf
echo "install jffs2 /bin/true" > /etc/modprobe.d/jffs2.conf
echo "install hfs /bin/true" > /etc/modprobe.d/hfs.conf
echo "install hfsplus /bin/true" > /etc/modprobe.d/hfsplus.conf
echo "install squashfs /bin/true" > /etc/modprobe.d/squashfs.conf
echo "install udf /bin/true" > /etc/modprobe.d/udf.conf
# Disable USB storage if not needed
# echo "install usb-storage /bin/true" > /etc/modprobe.d/usb-storage.conf
# Apply sysctl
sysctl --system
auditd/rules.d/50-hardening.rules
## Identity
-w /etc/passwd -p wa -k identity
-w /etc/group -p wa -k identity
-w /etc/shadow -p wa -k identity
-w /etc/gshadow -p wa -k identity
-w /etc/security/opasswd -p wa -k identity
## Scope (sudo)
-w /etc/sudoers -p wa -k scope
-w /etc/sudoers.d/ -p wa -k scope
## Privilege escalation
-a always,exit -F arch=b64 -S execve -C uid!=euid -k priv_esc
-a always,exit -F arch=b32 -S execve -C uid!=euid -k priv_esc
Testing and Validation
| Test | Method | Expected Result | Actual Result | Evidence |
|---|---|---|---|---|
| SSH root login | ssh root@host |
Connection refused | Refused | screenshots/ssh-root-denied.png |
| SSH password auth | ssh user@host (no key) |
Permission denied | Denied | screenshots/ssh-password-denied.png |
| Auditd captures sudo | sudo ls |
Event in ausearch -k scope |
Captured | screenshots/auditd-sudo.png |
| Fail2ban triggers | 4 failed SSH attempts | IP banned for 1 hour | Banned | screenshots/fail2ban-ban.png |
| Lynis hardening index | lynis audit system |
Score > 70 | 78 | screenshots/lynis-score.png |
| OpenSCAP CIS L1 pass | oscap xccdf eval ... |
All rules pass | 92/104 pass | screenshots/openscap-report.html |
Results
- Lynis hardening index: 78/100 (baseline: 52)
- OpenSCAP CIS Level 1: 92 of 104 rules passing
- Failed OpenSCAP rules: 12 rules require manual review (e.g., partitioning, AIDE)
- auditd events/day: ~2,400 (baseline: ~180)
- fail2ban bans (test period): 3 IPs blocked during brute-force test
Limitations: This lab covers CIS Level 1 only. Level 2 controls (e.g., partitioning, AIDE, specific daemon configs) were not implemented due to time constraints. The auditd rule set generates significant log volume; production deployment would require log aggregation and retention planning.
Screenshots and Diagrams
../../screenshots/linux-hardening-lynis-score.png— Lynis hardening index comparison../../screenshots/linux-hardening-openscap-report.png— OpenSCAP CIS L1 results../../screenshots/linux-hardening-auditd-events.png— Auditd event examples../../diagrams/linux-hardening-workflow.drawio— Lab workflow diagram
Challenges Encountered
-
Challenge: auditd rule ordering caused high CPU on log-heavy systems Resolution: Moved high-frequency rules (execve) to the end; added rate limiting in auditd.conf Lesson: Audit rule order matters. Test on realistic workload before deploying.
-
Challenge: OpenSCAP reported failures on partitioning rules that require reinstall Resolution: Documented as known gaps; noted that cloud images cannot easily change partitioning Lesson: Some CIS controls are environment-dependent. Document exceptions honestly.
-
Challenge: Lynis and OpenSCAP disagreed on several controls Resolution: Cross-referenced each finding against the CIS Benchmark PDF manually Lesson: Scanners have different coverage. Use multiple tools and verify against the source standard.
Lessons Learned
- Hardening is iterative: scan → fix → scan → fix. One-pass hardening misses things.
- Auditd generates actionable data but requires log management infrastructure.
- CIS Benchmarks are a baseline, not a complete security posture.
- Snapshots before each major change saved hours of rework.
- Documenting exceptions is as important as implementing controls.
Limitations
- Tested on Ubuntu 22.04 LTS only; not validated on other distributions
- VirtualBox VM environment; cloud instances may have different constraints
- No log aggregation (ELK/Splunk) implemented; auditd logs stored locally
- AIDE (file integrity) not configured due to time
- Network-level controls (firewall, network segmentation) not covered
Future Improvements
- Add AIDE file integrity monitoring
- Implement log forwarding to ELK stack
- Create Ansible playbook for automated deployment
- Test on Rocky Linux / AlmaLinux
- Add CIS Level 2 controls where feasible
- Integrate with OpenSCAP remediation playbooks
References
- CIS Ubuntu 22.04 Benchmark
- Lynis Documentation
- OpenSCAP User Manual
- auditd Rule Syntax
- fail2ban Configuration
One-Paragraph Summary
I built a Linux server hardening lab to address the problem of default configurations exposing unnecessary attack surface. I used CIS Benchmarks, auditd, and fail2ban to implement SSH key-only authentication, disabled unused services, configured kernel parameters, and set up log monitoring. I validated the solution by running Lynis and OpenSCAP scans before and after hardening, which demonstrated a reduction in high-severity findings from 23 to 3. During the project, I learned that auditd rule ordering significantly affects performance and identified that automated remediation would be needed for fleet management as a next improvement. EOF
### Step 7: Create certifications document
Create `certifications/README.md`:
```bash
cat > certifications/README.md << 'EOF'
# Certifications and Coursework
List certifications and relevant courses accurately. Do not include in-progress items as completed.
## Certifications
| Certification | Issuer | Date Earned | Expiration | Verification |
|---------------|--------|-------------|------------|--------------|
| Google Cybersecurity Professional Certificate | Google / Coursera | 2026-03-15 | None | [Verify](https://coursera.org/verify/XXXXXX) |
| TryHackMe SOC Level 1 | TryHackMe | 2026-06-22 | None | [Verify](https://tryhackme.com/cert/XXXXXX) |
| TryHackMe Cyber Security 101 | TryHackMe | 2026-04-10 | None | [Verify](https://tryhackme.com/cert/XXXXXX) |
## Relevant Coursework
| Course | Platform | Completion Date | Topics Covered |
|--------|----------|-----------------|----------------|
| Network Security Fundamentals | Cisco Networking Academy | 2026-02-20 | Firewalls, VPN, IDS/IPS, AAA |
| Linux Administration Basics | edX | 2026-01-15 | Permissions, services, networking, shell |
| Introduction to Containers | Red Hat / Coursera | 2026-05-05 | Docker, Podman, container concepts |
| AWS Cloud Practitioner Essentials | AWS Skill Builder | 2026-07-12 | Core services, security, pricing, support |
## In Progress
| Certification / Course | Platform | Expected Completion |
|------------------------|----------|---------------------|
| CompTIA Security+ | CompTIA | 2026-12-31 |
| AWS Solutions Architect Associate | AWS | 2027-03-31 |
## Notes
- Certifications support project evidence but do not replace it.
- Each certification above maps to at least one project in this portfolio.
- Verification links are placeholders; replace with actual credential URLs.
- Never list expired certifications as current.
- Never invent certifications, badges, or completion dates.
EOF
Step 8: Create the one-paragraph template
Create templates/one-paragraph-template.md:
cat > templates/one-paragraph-template.md << 'EOF'
# One-Paragraph Project Explanation Template
Use this template for every project. Replace all bracketed sections with your actual project details.
## The Formula
> I built a **[project type]** to address **[specific problem]**. I used **[tools and technologies]** to implement **[important technical approach]**. I validated the solution by **[tests or evidence]**, which demonstrated **[actual result]**. During the project, I learned **[specific lesson]** and identified **[limitation or next improvement]**.
## Element Breakdown
| Element | What to Include | Example |
|---------|-----------------|---------|
| **Project type** | Category + what you built | "container image scanning pipeline" |
| **Specific problem** | Concrete security issue | "vulnerable base images reaching the registry" |
| **Tools and technologies** | 2–4 key tools, why chosen | "Trivy for scanning, Hadolint for linting, distroless for base images" |
| **Important technical approach** | The core implementation choice | "multi-stage scanning in GitHub Actions with policy gates" |
| **Tests or evidence** | How you proved it works | "introducing a known CVE and a root-user Dockerfile, both blocked" |
| **Actual result** | Measurable outcome | "pipeline blocked 100% of test vulnerabilities" |
| **Specific lesson** | Non-obvious learning | "distroless images break common debugging workflows" |
| **Limitation or next improvement** | Honest gap or next step | "SBOM generation would improve supply chain visibility" |
## Filled Example (Docker Security)
> I built a **container image scanning pipeline** to address **vulnerable base images and misconfigurations reaching the container registry**. I used **Trivy, Hadolint, and distroless base images in a GitHub Actions workflow** to implement **multi-stage scanning: filesystem scan at build, image scan before push, and configuration linting**. I validated the solution by **intentionally introducing a known CVE and a root-user Dockerfile, both of which the pipeline blocked**. During the project, I learned that **distroless images break some debugging workflows** and identified that **SBOM generation would improve supply chain visibility** as a next improvement.
## Your Turn
Copy the template below and fill it in:
> I built a **[project type]** to address **[specific problem]**. I used **[tools and technologies]** to implement **[important technical approach]**. I validated the solution by **[tests or evidence]**, which demonstrated **[actual result]**. During the project, I learned **[specific lesson]** and identified **[limitation or next improvement]**.
## Tips
- Keep it to one paragraph (3–5 sentences)
- Use specific tool names, not categories ("Trivy" not "a scanner")
- Include a measurable result ("blocked 3 CVEs" not "improved security")
- Admit a real limitation — it shows maturity
- Read it aloud: does it sound like you?
EOF
Step 9: Create the portfolio checklist
Create templates/portfolio-checklist.md:
cat > templates/portfolio-checklist.md << 'EOF'
# Portfolio Checklist
Use this checklist before publishing or sharing your portfolio. Check each item honestly.
## Professional Introduction
- [ ] Summary is 3–5 sentences, no buzzwords
- [ ] Technical interests are specific, not generic
- [ ] Core skills (3–5) each map to a project
- [ ] Career direction states target roles
- [ ] Links to GitHub, LinkedIn work and are current
## Technical Skills
- [ ] Skills organized into meaningful categories (not a flat list)
- [ ] Every category has at least one evidence project
- [ ] No "expert," "mastery," or "proficient" without evidence
- [ ] Tool versions mentioned where relevant
- [ ] Outdated or unused skills removed
## Projects (per project)
- [ ] Clear problem statement (what security issue?)
- [ ] Specific, measurable objectives
- [ ] Architecture or workflow diagram
- [ ] Tools table with versions and justification
- [ ] Implementation steps with commands/configs
- [ ] Configuration examples (sanitized)
- [ ] Testing table: method, expected, actual, evidence
- [ ] Results with truthful metrics
- [ ] Limitations explicitly stated
- [ ] Challenges and lessons learned documented
- [ ] Future improvements listed
- [ ] References to authoritative sources
- [ ] One-paragraph summary at the top
## Evidence Quality
- [ ] All screenshots sanitized (no real IPs, keys, hostnames, account IDs)
- [ ] Configuration files use placeholders (`<YOUR_BUCKET>`, `arn:aws:iam::123456789012:role/ExampleRole`)
- [ ] No proprietary code or employer-confidential information
- [ ] Terminal output shows real commands and results (not fabricated)
- [ ] Diagrams are readable and labeled
- [ ] Before/after comparisons are accurate
## Repository Hygiene (if using GitHub)
- [ ] Repository names are consistent (kebab-case)
- [ ] Descriptions are one clear sentence
- [ ] No "initial commit" only — meaningful history
- [ ] No secrets in history (run Gitleaks/TruffleHog)
- [ ] `.gitignore` excludes `.env`, `*.key`, `*.pem`, `*.log`, `node_modules/`, `dist/`
- [ ] License file present (MIT, Apache-2.0, etc.)
- [ ] Pinned repositories are the 4–6 strongest projects
## Certifications
- [ ] All listed certifications are real and verifiable
- [ ] Dates are accurate (earned, not purchased)
- [ ] Expired certifications marked or removed
- [ ] In-progress items clearly labeled
- [ ] No invented badges or credentials
## Security and Privacy
- [ ] Secret scan run on all repositories (Gitleaks, TruffleHog, git-secrets)
- [ ] All screenshots reviewed for sensitive data
- [ ] No real credentials in any file
- [ ] No internal hostnames, IPs, or account IDs
- [ ] No customer data or PII
- [ ] NDA-bound projects excluded or generalized with permission
## Maintenance
- [ ] All links work (GitHub, LinkedIn, project URLs, verification links)
- [ ] Portfolio updated within last 30 days
- [ ] Outdated projects archived or removed
- [ ] New projects added as completed
- [ ] Contact information current
## Final Review
- [ ] Read every project README aloud — does it sound like you?
- [ ] Ask a peer to review: "Can you understand what I did and why?"
- [ ] Check mobile rendering (GitHub README, personal site)
- [ ] Verify download links work (if providing resources)
- [ ] Confirm no sensitive data in any committed file
---
**Pass threshold:** All items in "Professional Introduction," "Projects," "Evidence Quality," and "Security and Privacy" must be checked. Other sections should be ≥80% complete.
EOF
Step 10: Initialize Git repository
# Initialize Git
git init
# Create .gitignore
cat > .gitignore << 'EOF'
# OS and editor files
.DS_Store
Thumbs.db
*.swp
*.swo
*~
.vscode/
.idea/
*.log
# Credentials and secrets (never commit)
.env
.env.*
*.key
*.pem
*.crt
*.p12
*.pfx
secrets/
credentials/
# Local config
local-config/
*.local.*
# Build artifacts (if any)
dist/
build/
node_modules/
__pycache__/
*.pyc
# Temporary files
tmp/
temp/
*.tmp
*.bak
EOF
# Create LICENSE (MIT)
cat > LICENSE << 'EOF'
MIT License
Copyright (c) 2026 Your Name
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
EOF
# Stage and commit
git add .
git status
git commit -m "Initial portfolio structure with templates and sample project"
Step 11: Publish to Git hosting (optional)
If you choose to publish to GitHub, GitLab, or another Git host:
# Create a new repository on your Git host (e.g., GitHub)
# Then add the remote and push:
git remote add origin https://github.com/yourusername/security-portfolio.git
git branch -M main
git push -u origin main
For GitLab:
git remote add origin https://gitlab.com/yourusername/security-portfolio.git
git branch -M main
git push -u origin main
For a self-hosted Gitea/Forgejo:
git remote add origin https://git.yourdomain.com/yourusername/security-portfolio.git
git branch -M main
git push -u origin main
Complete lab command summary
# All commands in sequence
mkdir -p security-portfolio && cd security-portfolio
mkdir -p about skills projects certifications diagrams screenshots templates
mkdir -p projects/linux-hardening projects/docker-security projects/ci-cd-security
# Create all files (use the cat > commands from Steps 2–9)
# ... create README.md, about/introduction.md, skills/technical-skills.md
# ... create templates/project-template.md, projects/linux-hardening/README.md
# ... create certifications/README.md, templates/one-paragraph-template.md
# ... create templates/portfolio-checklist.md
git init
# Create .gitignore and LICENSE
git add .
git commit -m "Initial portfolio structure with templates and sample project"
# Optional: publish
# git remote add origin <your-repo-url>
# git push -u origin main
Portfolio structure demonstrated
The lab produces this structure:
security-portfolio/
├── README.md
├── about/
│ └── introduction.md
├── skills/
│ └── technical-skills.md
├── projects/
│ ├── linux-hardening/
│ │ └── README.md
│ ├── docker-security/
│ │ └── README.md
│ └── ci-cd-security/
│ └── README.md
├── certifications/
│ └── README.md
├── diagrams/
├── screenshots/
├── templates/
│ ├── project-template.md
│ ├── one-paragraph-template.md
│ └── portfolio-checklist.md
├── LICENSE
└── .gitignore
Final checklist
Before considering your portfolio ready for review:
- Professional introduction is accurate and specific
- Skills have supporting evidence (each maps to a project)
- Projects have clear, measurable objectives
- Every project includes a comprehensive README using the template
- Architecture diagrams are readable and labeled
- Screenshots are sanitized (no real credentials, IPs, hostnames)
- Test results are truthful (no inflated numbers)
- Limitations are explicitly disclosed for every project
- No credentials or confidential information in any file
- Repository names and descriptions are professional
- All links work
- Portfolio updated within the last 30 days
- Secret scan passes on all repositories
Official references
- GitHub Documentation: About READMEs
- GitHub Documentation: Managing your profile README
- GitHub Pages Documentation
- NICE Cybersecurity Workforce Framework
- OWASP Top 10
- CISA Secure by Design
- CIS Benchmarks
- MITRE ATT&CK Framework
- NIST Cybersecurity Framework
This article and its templates are licensed under MIT. Use them freely to build your own portfolio. Replace all placeholder content with your actual work. EOF