Remove git dependency from CodeBuild deployment script#91
Conversation
|
Latest scan for commit: Security Scan ResultsScan Metadata
SummaryScanner ResultsThe table below shows findings by scanner, with status based on severity thresholds and dependencies: Column Explanations: Severity Levels (S/C/H/M/L/I):
Other Columns:
Scanner Results:
Severity Thresholds (Thresh Column):
Threshold Source: Values in parentheses indicate where the threshold is configured:
Statistics calculation:
|
19a4f58 to
e103c91
Compare
e103c91 to
7c19e2e
Compare
brianz
left a comment
There was a problem hiding this comment.
One small comment but otherwise I trust that this is a good change.
|
|
||
| ### Option B: Deploy via CodeBuild | ||
|
|
||
| Requires only Python 3.8+ and AWS CLI — no Node.js, Docker, or CDK needed. |
There was a problem hiding this comment.
Let's update this to a more modern Python version. I believe other docs state python 3.11+. 3.8 is EOL and released almost 7 years ago.
There was a problem hiding this comment.
Makes sense, updated to 3.11+ consistent with the rest of the project.
848ccd7 to
7257716
Compare
Rework the CodeBuild deployment script to drop the silent git dependency and tighten resource lifecycle: - Package only git-tracked/staged files via 'git ls-files'; warn about untracked files instead of silently dropping or over-including them. Require git rather than falling back to a filesystem walk. - Create the source bucket, IAM role, permission boundary, and CodeBuild project per run; tear them all down on a successful build and retain them (with console/log links) on failure for debugging and reuse. - Add a 1-day object-expiry lifecycle rule on the source bucket so a retained archive can't linger. - Remove the separate cleanup-codebuild-project.py (teardown is built in). - Set CedarPolicyLambda to ARM_64 to match FeedbackLambda and the ARM64 CodeBuild host, avoiding cross-platform bundling failures. - Update scripts/README.md and docs/DEPLOYMENT.md to match.
983596d to
e509c01
Compare
Problem
The current
deploy-with-codebuild.pyusesgit ls-filesbut silently depends on git and drops untracked files. Cleanup is also unconditional and always leaves the CodeBuild project behind, and the build fails on ARM64 becauseCedarPolicyLambdabundles forlinux/amd64.Solution
Keep git-based packaging but make it explicit, tie resource teardown to the build result, and fix the architecture mismatch.
Changes:
CedarPolicyLambdatoARM_64to matchFeedbackLambdaand the ARM64 build hostscripts/README.mdanddocs/DEPLOYMENT.md