Skip to content

feat(lab3): secure git signing and secret scanning#1054

Open
Nopef wants to merge 5 commits into
inno-devops-labs:mainfrom
Nopef:feature/lab3
Open

feat(lab3): secure git signing and secret scanning#1054
Nopef wants to merge 5 commits into
inno-devops-labs:mainfrom
Nopef:feature/lab3

Conversation

@Nopef

@Nopef Nopef commented Jun 14, 2026

Copy link
Copy Markdown

Goal

Set up secure Git for Lab 3: SSH commit signing, gitleaks in pre-commit, and a sandbox history rewrite with git filter-repo.

Changes

  • Added submissions/lab3.md β€” SSH signing evidence, gitleaks block test, tune-out notes, bonus filter-repo results
  • Added .pre-commit-config.yaml β€” gitleaks v8.30.1, detect-private-key, check-added-large-files (500 KB max)

Testing

Task 1 β€” SSH signing

  • gpg.format β†’ ssh
  • user.signingkey β†’ /root/.ssh/id_ed25519.pub
  • commit.gpgsign β†’ true
  • Local: git log --show-signature -1 β†’ Good "git" signature (ED25519)
  • GitHub: commit 1bfbc80 β€” Verified badge (screenshot)

Task 2 β€” pre-commit + gitleaks

  • pre-commit install β†’ pre-commit installed at .git/hooks/pre-commit
  • pre-commit run --all-files β€” gitleaks passed; detect-private-key failed on course file labs/lab6/.../configure.yml (expected)
  • Fake PAT in submissions/leak-attempt.txt β€” commit blocked: RuleID: github-pat; file unstaged and removed

Bonus β€” filter-repo (sandbox /tmp/lab3-bonus, not in this PR)

  • Before: git log -p | grep -c 'ghp_' β†’ 2
  • After: ghp_ β†’ 0, REDACTED β†’ 2
  • Second step in a real incident: rotate/revoke the exposed secret

Artifacts & Screenshots

  • submissions/lab3.md
  • .pre-commit-config.yaml
  • Verified badge: Yandex link in submission
  • Blocked gitleaks output + bonus before/after: in submissions/lab3.md

Checklist

  • Title is clear (feat(lab3): SSH signing + gitleaks pre-commit)
  • No secrets/large temp files committed
  • Submission file at submissions/lab3.md exists

  • Task 1 β€” SSH signing + Verified badge
  • Task 2 β€” .pre-commit-config.yaml + gitleaks blocking
  • Bonus β€” filter-repo documented in submissions/lab3.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant