Skip to content
Open
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
19 changes: 19 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Goal
Describe the goal of this PR

## Changes
- Change 1
- Change 2

## Testing
Explain how this was tested

## Artifacts & Screenshots
Attach screenshots or logs

---

### Checklist
- [ ] Clear PR title
- [ ] Documentation updated if needed
- [ ] No secrets or large temporary files
Binary file added labs/commit_verified.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/removed_secret_not_blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/secret_blocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added labs/ssh_added.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions labs/submission3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Lab 3 — Secure Git

## Task 1 — SSH Commit Signing

### 1. Benefits of Commit Signing

- Ensures authenticity of commits
- Protects against impersonation
- Ensures commit integrity
- Important in DevSecOps pipelines

### 2. Evidence

#### Command for Key Generation
```bash
ssh-keygen -t ed25519 -C "menshih.maksym@yandex.ru"
```

#### Git Config Output
```bash
git config --global gpg.format ssh
git config --global user.signingkey ~/.ssh/id_rsa.pub
```

#### Screenshots

![SSH Key Added](ssh_added.png)
![Verified Badge](commit_verified.png)


### 3. Analysis

Commit signing is critical in DevSecOps workflows because:
- CI/CD relies on trusted code
- Prevents supply chain attacks
- Ensures traceability
- Supports compliance

## Task 2 — Pre-commit Secret Scanning

### 1. Setup

- Created `.git/hooks/pre-commit`
- Made executable
- Docker required

### 2. Testing

- Added fake AWS key
- Commit blocked
- Removed secret
- Commit allowed

### 3. Analysis

Automated secret scanning prevents incidents by:
- Preventing accidental leaks
- Stopping secrets before they enter history
- Reducing risk of credential compromise
- Supporting shift-left security

### 4. Screenshots

![File with secret blocked](secret_blocked.png)
![File without secret not blocked](removed_secret_not_blocked.png)