Skip to content

Conversation

@Alfredooe
Copy link
Owner

This commit addresses several issues identified during a code review:

  • Security:

    • Updates go-git and golang.org/x/crypto to their latest secure versions to mitigate known vulnerabilities.
    • Fixes a path traversal vulnerability by sanitizing file paths from Git commits.
  • Refactoring:

    • Removes the redundant deployChangedStacks function.
    • Refactors the deployChangedStacksWithResults function into smaller, more focused functions (getCurrentStacks, getAffectedStacks, deployStacks, cleanupDeletedStacks).
    • Fixes a regression in deployAllStacks to ensure it correctly cleans up deleted stacks.
  • Testing:

    • Adds a new test suite for the getAffectedStacks function to verify its correctness and prevent regressions.

This commit addresses several issues identified during a code review:

- **Security:**
  - Updates `go-git` and `golang.org/x/crypto` to their latest secure versions to mitigate known vulnerabilities.
  - Fixes a path traversal vulnerability by sanitizing file paths from Git commits.

- **Refactoring:**
  - Removes the redundant `deployChangedStacks` function.
  - Refactors the `deployChangedStacksWithResults` function into smaller, more focused functions (`getCurrentStacks`, `getAffectedStacks`, `deployStacks`, `cleanupDeletedStacks`).
  - Fixes a regression in `deployAllStacks` to ensure it correctly cleans up deleted stacks.

- **Testing:**
  - Adds a new test suite for the `getAffectedStacks` function to verify its correctness and prevent regressions.
@Alfredooe Alfredooe merged commit 5c6c7ef into main Oct 25, 2025
1 check failed
@Alfredooe Alfredooe deleted the refactor-and-secure-deployment branch October 26, 2025 14:32
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.

2 participants