diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/.editorconfig b/PROJECTS/intermediate/credential-rotation-enforcer/.editorconfig new file mode 100644 index 00000000..89656622 --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/.editorconfig @@ -0,0 +1,15 @@ +# ©AngelaMos | 2026 +# .editorconfig + +root = true + +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/.gitignore b/PROJECTS/intermediate/credential-rotation-enforcer/.gitignore new file mode 100644 index 00000000..d1c230ff --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/.gitignore @@ -0,0 +1,19 @@ +# ©AngelaMos | 2026 +# .gitignore + +/bin/ +/lib/ +/.shards/ +/.crystal/ +*.dwarf +.env.local +.env.pending +*.pid +/coverage/ +/tmp/ +*.log +.DS_Store + +# Local-only dev docs (not committed to public repo) +/docs/research/ +/docs/plans/ diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/LICENSE b/PROJECTS/intermediate/credential-rotation-enforcer/LICENSE new file mode 100644 index 00000000..a615e738 --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Carter Perez + +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. diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/Makefile b/PROJECTS/intermediate/credential-rotation-enforcer/Makefile new file mode 100644 index 00000000..2c958897 --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/Makefile @@ -0,0 +1,57 @@ +# ©AngelaMos | 2026 +# Makefile + +.PHONY: build build-dev test test-unit test-integration lint format format-check demo demo-full demo-full-down check ci clean + +CRYSTAL ?= crystal +SHARDS ?= shards + +build: + $(SHARDS) build cre --release --no-debug + +build-dev: + $(SHARDS) build cre + +test: + $(CRYSTAL) spec --order=random + +test-unit: + $(CRYSTAL) spec spec/unit --order=random + +test-integration: + $(CRYSTAL) spec spec/integration --order=random + +lint: + @if [ -x ./bin/ameba ]; then \ + ./bin/ameba; \ + else \ + echo "ameba not installed (requires libpcre3-dev on Debian 13+); skipping lint"; \ + fi + +format: + $(CRYSTAL) tool format + +format-check: + $(CRYSTAL) tool format --check + +demo: + $(SHARDS) build cre && ./bin/cre demo + +demo-full: + docker compose -f docker/docker-compose.yml up -d + @echo "Waiting for services..." + @sleep 8 + $(SHARDS) build cre && ./bin/cre run --config=config/demo-full.cr + +demo-full-down: + docker compose -f docker/docker-compose.yml down -v + +check: + $(MAKE) format-check + $(MAKE) lint + $(MAKE) test + +ci: check + +clean: + rm -rf bin lib .shards .crystal coverage tmp diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/README.md b/PROJECTS/intermediate/credential-rotation-enforcer/README.md new file mode 100644 index 00000000..9160b09b --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/README.md @@ -0,0 +1,13 @@ + + +# Credential Rotation Enforcer (cre) + +A Crystal-based daemon that tracks and enforces credential rotation +policies across AWS Secrets Manager, HashiCorp Vault, GitHub fine-grained +PATs, and local `.env` files. + +> Full README, asciinema demos, and walkthrough live in `learn/`. +> This README will be expanded in Phase 16 of the build. diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/shard.lock b/PROJECTS/intermediate/credential-rotation-enforcer/shard.lock new file mode 100644 index 00000000..4da0ce31 --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/shard.lock @@ -0,0 +1,33 @@ +version: 2.0 +shards: + db: + git: https://github.com/crystal-lang/crystal-db.git + version: 0.11.0 + + html5: + git: https://github.com/naqvis/crystal-html5.git + version: 0.4.0 + + http_proxy: + git: https://github.com/mamantoha/http_proxy.git + version: 0.14.0+git.commit.5a02af05c5531c639efdf651431a86ec90905f71 + + pg: + git: https://github.com/will/crystal-pg.git + version: 0.26.0 + + sqlite3: + git: https://github.com/crystal-lang/crystal-sqlite3.git + version: 0.19.0 + + tourmaline: + git: https://github.com/protoncr/tourmaline.git + version: 0.28.0 + + webmock: + git: https://github.com/manastech/webmock.cr.git + version: 0.14.0 + + xpath2: + git: https://github.com/naqvis/crystal-xpath2.git + version: 0.2.0 diff --git a/PROJECTS/intermediate/credential-rotation-enforcer/shard.yml b/PROJECTS/intermediate/credential-rotation-enforcer/shard.yml new file mode 100644 index 00000000..0afcc30e --- /dev/null +++ b/PROJECTS/intermediate/credential-rotation-enforcer/shard.yml @@ -0,0 +1,35 @@ +# ©AngelaMos | 2026 +# shard.yml + +name: cre +version: 0.1.0 +description: | + Credential Rotation Enforcer - tracks and enforces credential rotation + policies across cloud secret managers, vaults, and developer tooling. +authors: + - Carter Perez +license: MIT +crystal: ">= 1.20.0" + +targets: + cre: + main: src/cre.cr + +dependencies: + db: + github: crystal-lang/crystal-db + version: ~> 0.9 + pg: + github: will/crystal-pg + version: ~> 0.9 + sqlite3: + github: crystal-lang/crystal-sqlite3 + version: ~> 0.9 + tourmaline: + github: protoncr/tourmaline + version: ~> 0.28 + +development_dependencies: + webmock: + github: manastech/webmock.cr + version: ~> 0.9