Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Summary

<!-- What does this change and why? -->

## Testing

<!-- How was this verified? -->

43 changes: 43 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Security

on:
push:
branches: [main]
pull_request:

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
gitleaks:
name: Gitleaks
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: gitleaks/gitleaks-action@e0c47f4f8be36e29cdc102c57e68cb5cbf0e8d1e # v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_ENABLE_COMMENTS: false

zizmor:
name: Zizmor
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@45d7276c9ca790aabd705e31ca99c6185c3e76dd # v0.8.1
with:
advanced-security: false
annotations: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -218,3 +218,8 @@ __marimo__/

# Streamlit
.streamlit/secrets.toml

# Claude

.claude
CLAUDE.md
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
repos:
- repo: local
hooks:
- id: gitleaks
name: gitleaks
entry: just gitleaks --pre-commit --staged
language: system
pass_filenames: false
- id: zizmor
name: zizmor
entry: just zizmor
language: system
pass_filenames: false
files: ^\.github/
4 changes: 4 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
brew "gitleaks"
brew "just"
brew "prek"
brew "zizmor"
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,25 @@
# cyber-security-lab
# Cybersecurity Lab

[![Security](https://github.com/ahcodedev/cyber-security-lab/actions/workflows/security.yml/badge.svg?branch=main)](https://github.com/ahcodedev/cyber-security-lab/actions/workflows/security.yml)
[![gitleaks](https://img.shields.io/badge/protected%20by-gitleaks-blue)](https://github.com/gitleaks/gitleaks)
[![zizmor](https://img.shields.io/badge/%F0%9F%8C%88-zizmor-white?labelColor=white)](https://zizmor.sh/)

Cybersecurity Lab Environment

## Setup

```sh
brew bundle
prek install
```

## Security checks

| Command | Purpose |
| --------------- | --------------------------------- |
| `just gitleaks` | Scan git history for secrets |
| `just zizmor` | Audit GitHub Actions workflows |
| `prek run -a` | Run the pre-commit hooks manually |

Both checks run on commit via prek and in CI via `.github/workflows/security.yml`.

11 changes: 11 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[private]
list:
@just --list

# Scan git history for secrets
gitleaks *args:
gitleaks git --redact --verbose {{ args }}

# Audit GitHub Actions workflows
zizmor *args:
zizmor {{ args }} .
Loading