Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(codebuild): add new check codebuild_project_logging_enabled #5365

Conversation

puchy22
Copy link
Member

@puchy22 puchy22 commented Oct 10, 2024

Context

Check if CodeBuild has logging enabled.

Description

  • Add cloudwatch_log to Project model
  • Add CloudWatchLog model
  • Test new projects attribute
  • Add check logic
  • Add unit testing for the check

Checklist

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@puchy22 puchy22 requested review from a team as code owners October 10, 2024 15:52
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Oct 10, 2024
@puchy22 puchy22 changed the base branch from master to PRWLR-4460-ensure-code-build-s-3-logs-are-encrypted October 10, 2024 16:12
Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.21%. Comparing base (82ab439) to head (ea5cf3a).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5365      +/-   ##
==========================================
- Coverage   89.45%   89.21%   -0.24%     
==========================================
  Files        1035     1038       +3     
  Lines       31784    32033     +249     
==========================================
+ Hits        28432    28579     +147     
- Misses       3352     3454     +102     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from PRWLR-4460-ensure-code-build-s-3-logs-are-encrypted to master October 14, 2024 18:40
"ResourceIdTemplate": "arn:partition:service:region:account-id:resource-id",
"Severity": "medium",
"ResourceType": "AwsCodeBuildProject",
"Description": "From a security perspective, logging is an important feature to enable for future forensics efforts in the case of any security incidents. Correlating anomalies in CodeBuild projects with threat detections can increase confidence in the accuracy of those threat detections.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make the description shorter please, and add that info in the risk.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you show in the status extended where are the logs enabled? (In which S3 bucket, CW log group or both)

Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, review my comments.

@sergargar sergargar merged commit aac6038 into master Oct 15, 2024
10 of 11 checks passed
@sergargar sergargar deleted the PRWLR-4462-ensure-code-build-project-environments-have-logging-enabled branch October 15, 2024 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants