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

Remove rules that should be unnecessary #47

Closed
wants to merge 1 commit into from
Closed

Conversation

timja
Copy link

@timja timja commented Sep 3, 2024

Jira link

See PROJ-XXXXXX

Change description

Testing done

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

🤖AEP PR SUMMARY🤖

components/main.tf

  • Removed the dismiss_stale_reviews_on_push attribute from the github_organization_ruleset resource configuration.
  • Changed the require_code_owner_review attribute to false.

Copy link

github-actions bot commented Sep 3, 2024

Code Review for components/main.tf

Security and Best Practice

  1. Required Code Owner Review:
    You have set require_code_owner_review to false. Generally, for added security, especially in critical repositories, requiring a review from a code owner ensures that any changes are vetted by the most knowledgeable individuals about the parts of the code being changed.

    Improvement:
    Consider enabling code owner reviews to improve security and accountability:

    hcl
    require_code_owner_review = true

    
    
  2. Required Approving Review Count:
    The count is set to 1. For critical repositories or important changes, increasing the number of required approving reviews can significantly enhance the code's quality and security by encouraging more thorough reviews.

    Improvement:
    Depending on the importance of your repository, consider increasing the count:

    required_approving_review_count = 2

Cost and Carbon Usage

The changes proposed above do not have direct financial costs associated with them. However, they can potentially save costs by reducing the risk of security breaches or bug fixes later on in the development cycle. Implementing stricter code review practices helps catch issues early, potentially reducing the need for costly mitigation strategies after a product launch.

Additional Considerations

  • While not directly related to the changes, ensure that your review process is inclusive and manageable for your team, balancing security and efficiency.
  • Automation tools for code quality and security vulnerability scanning can complement the manual review process, offering a more robust defense mechanism against potential issues.

Without specific details on the context and sensitivity of the projects these settings apply to, these recommendations aim to balance security, code quality, and practical workflow considerations.

Copy link
Author

@timja timja left a comment

Choose a reason for hiding this comment

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

Hi, I can't see the reasoning anywhere for which rules were applied.

I've removed the questionable ones with my reasoning but please let me know if there was a reason they were added

@@ -49,11 +49,8 @@ resource "github_organization_ruleset" "default_ruleset" {
required_linear_history = true

pull_request {
dismiss_stale_reviews_on_push = true
Copy link
Author

Choose a reason for hiding this comment

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

This rule discourages pushing small changes and fixups as you have to go chasing reviews again

What was the reason this was enabled?

require_code_owner_review = false
required_approving_review_count = 1
require_last_push_approval = true
Copy link
Author

Choose a reason for hiding this comment

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

This rule discourages tidy ups for getting a change over the line, say:
Committer A makes change
Committer B tidies up, maybe fixing linting
Now A & B can't approve

This slows things down


Why was this added?

components/main.tf Show resolved Hide resolved
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