Skip to content

Commit 173670c

Browse files
committed
Harden repo security checks and rename christianlempa assets to smartmur
1 parent 147e768 commit 173670c

19 files changed

Lines changed: 135 additions & 33 deletions

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v6
1515

16+
- name: Setup Python
17+
uses: actions/setup-python@v6
18+
with:
19+
python-version: "3.x"
20+
21+
- name: Install pre-commit
22+
run: python -m pip install --upgrade pip pre-commit
23+
24+
- name: Pre-commit checks
25+
run: pre-commit run --all-files --show-diff-on-failure
26+
1627
- name: Shell syntax checks
1728
run: |
1829
bash -n bootstrap.sh

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,44 @@
1+
# macOS
12
.DS_Store
3+
.AppleDouble
4+
.LSOverride
5+
Icon?
6+
7+
# Editor and swap files
8+
*.swp
9+
*.swo
10+
*~
11+
12+
# Logs and temporary files
13+
*.log
14+
*.tmp
15+
*.temp
16+
*.bak
17+
*.orig
18+
19+
# Python caches
20+
__pycache__/
21+
*.py[cod]
22+
.mypy_cache/
23+
.pytest_cache/
24+
25+
# Local environment and secret material
26+
.env
27+
.env.*
28+
!.env.example
29+
.envrc
30+
*.pem
31+
*.key
32+
*.p12
33+
*.pfx
34+
*.kdbx
35+
*.ovpn
36+
*.agekey
37+
*.asc
38+
secrets.*
39+
*.secret
40+
41+
# Local shell overrides (never tracked)
42+
zsh/.zshrc.local
43+
zsh/.zsh/secrets.zsh
44+
zsh/.zsh/private.zsh

.pre-commit-config.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: detect-private-key
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
10+
- repo: local
11+
hooks:
12+
- id: security-scrub
13+
name: security scrub (working tree)
14+
entry: python3 scripts/security_scrub.py --no-history
15+
language: system
16+
pass_filenames: false

CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,19 @@ cd dotfiles
1010
./install.sh --skip-brew
1111
```
1212

13+
Install local hooks once:
14+
15+
```bash
16+
brew install pre-commit
17+
pre-commit install
18+
```
19+
1320
## Required Checks Before PR
1421

1522
```bash
1623
bash -n bootstrap.sh
1724
bash -n install.sh
25+
pre-commit run --all-files
1826
python3 scripts/security_scrub.py --no-history
1927
```
2028

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: install bootstrap lint security check
1+
.PHONY: install bootstrap lint security hooks precommit check
22

33
install:
44
./install.sh
@@ -13,4 +13,10 @@ lint:
1313
security:
1414
python3 scripts/security_scrub.py
1515

16-
check: lint security
16+
hooks:
17+
pre-commit install
18+
19+
precommit:
20+
pre-commit run --all-files
21+
22+
check: lint security precommit

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@
1212
[![Shell](https://img.shields.io/badge/Shell-Zsh-89e051)](https://www.zsh.org/)
1313
[![License](https://img.shields.io/badge/License-MIT-22c55e.svg)](LICENSE)
1414
[![Repo](https://img.shields.io/badge/GitHub-SmartMur%2Fdotfiles-181717?logo=github)](https://github.com/SmartMur/dotfiles)
15+
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-1f6feb?logo=pre-commit)](https://pre-commit.com/)
1516

1617
Production-ready macOS terminal dotfiles with reproducible setup, safe backups, Homebrew package management, and iTerm2 profile/theme automation.
1718

1819
![Terminal Preview](assets/images/terminal-preview.svg)
1920

20-
Start here: `docs/GETTING_STARTED.md`
21-
Contributing: `CONTRIBUTING.md`
22-
Security policy: `SECURITY.md`
23-
Security rulebook: `docs/SECURITY_RULEBOOK.md`
21+
Start here: `docs/GETTING_STARTED.md`
22+
Contributing: `CONTRIBUTING.md`
23+
Security policy: `SECURITY.md`
24+
Security rulebook: `docs/SECURITY_RULEBOOK.md`
2425
Roadmap: `ROADMAP.md`
2526

2627
## Overview
@@ -44,14 +45,14 @@ This repository captures your preferred terminal environment so it can be applie
4445
├── assets/images/
4546
├── config/.config/
4647
│ ├── iterm2/
47-
│ └── starship.christianlempa.toml
48+
│ └── starship.smartmur.toml
4849
└── zsh/
4950
├── .zshrc
5051
└── .zsh/
51-
├── aliases.christianlempa.zsh
52-
├── functions.christianlempa.zsh
53-
├── nvm.christianlempa.zsh
54-
└── starship.christianlempa.zsh
52+
├── aliases.smartmur.zsh
53+
├── functions.smartmur.zsh
54+
├── nvm.smartmur.zsh
55+
└── starship.smartmur.zsh
5556
```
5657

5758
## Requirements
@@ -80,11 +81,19 @@ exec zsh
8081
```bash
8182
bash -n bootstrap.sh
8283
bash -n install.sh
84+
pre-commit run --all-files
8385
python3 scripts/security_scrub.py
8486
```
8587

8688
If a leak is detected, stop and follow `docs/SECURITY_RULEBOOK.md` before any push.
8789

90+
Install hooks once per clone:
91+
92+
```bash
93+
brew install pre-commit
94+
pre-commit install
95+
```
96+
8897
## Dependabot PR Automation
8998

9099
Dependabot PRs are auto-managed by:
@@ -111,10 +120,10 @@ The bootstrap script installs prerequisites if needed, clones this repo into `~/
111120
## iTerm2 and Branding
112121

113122
- Dynamic profile location:
114-
- `~/Library/Application Support/iTerm2/DynamicProfiles/christianlempa.dynamic.json`
123+
- `~/Library/Application Support/iTerm2/DynamicProfiles/smartmur.dynamic.json`
115124
- Additional profile assets:
116-
- `~/.config/iterm2/christianlempa.itermcolors`
117-
- `~/.config/iterm2/christianlempa-profile.json`
125+
- `~/.config/iterm2/smartmur.itermcolors`
126+
- `~/.config/iterm2/smartmur-profile.json`
118127

119128
Brand assets copied from `https://smartmur.ca` on February 18, 2026:
120129

@@ -125,7 +134,7 @@ Brand assets copied from `https://smartmur.ca` on February 18, 2026:
125134

126135
- Core shell behavior: `zsh/.zshrc`
127136
- Aliases/functions modules: `zsh/.zsh/*`
128-
- Prompt style: `config/.config/starship.christianlempa.toml`
137+
- Prompt style: `config/.config/starship.smartmur.toml`
129138
- Package list: `Brewfile`
130139

131140
After changing files in this repo:

SECURITY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ If a secret is exposed:
3333
2. Remove secret from current branch.
3434
3. Rewrite history if needed.
3535
4. Re-run:
36+
- `pre-commit run --all-files`
3637
- `python3 scripts/security_scrub.py`
3738
- `bash -n bootstrap.sh`
3839
- `bash -n install.sh`
@@ -42,6 +43,7 @@ Use `docs/SECURITY_RULEBOOK.md` for command-level incident steps.
4243

4344
## Baseline Security Checks
4445

46+
- `pre-commit run --all-files`
4547
- `scripts/security_scrub.py`
4648
- `bash -n bootstrap.sh`
4749
- `bash -n install.sh`

config/.config/iterm2/christianlempa-profile.json renamed to config/.config/iterm2/smartmur-profile.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,4 +385,4 @@
385385
"Alpha Component" : 1,
386386
"Green Component" : 0.51372549019607838
387387
}
388-
}
388+
}

config/.config/iterm2/christianlempa.dynamic.json renamed to config/.config/iterm2/smartmur.dynamic.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"Prompt Before Closing 2": false,
8686
"BM Growl": true,
8787
"Command": "",
88-
"Description": "ChristianLempa",
88+
"Description": "SmartMur",
8989
"Space": 0,
9090
"Mouse Reporting": true,
9191
"Screen": -1,
@@ -321,7 +321,7 @@
321321
"Alpha Component": 1,
322322
"Green Component": 0.78431372549019607
323323
},
324-
"Name": "ChristianLempa",
324+
"Name": "SmartMur",
325325
"Cursor Text Color": {
326326
"Green Component": 1,
327327
"Red Component": 1,
File renamed without changes.

0 commit comments

Comments
 (0)