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

Add DefaultFrameworks field to InstallationData struct #421

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dwertent
Copy link
Contributor

@dwertent dwertent commented Dec 17, 2024

User description

This will allow the operator to receive the default frameworks as a configuration


PR Type

Enhancement


Description

  • Added new DefaultFrameworks field to InstallationData struct to allow configuring default frameworks via operator
  • Field is defined as string array with proper JSON/BSON serialization tags
  • Includes omitempty option to maintain backward compatibility

Changes walkthrough 📝

Relevant files
Enhancement
portaltypes.go
Add DefaultFrameworks configuration field to InstallationData

armotypes/portaltypes.go

  • Added DefaultFrameworks field to InstallationData struct as a string
    array
  • Field includes JSON and BSON tags with omitempty option
  • +1/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Incorrect Comment
    The comment for DefaultFrameworks field appears to be copied from ExcludeNamespaces and is incorrect. It should describe the purpose of default frameworks configuration instead of namespace exclusion.

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Fix incorrect documentation comment that was copy-pasted from another field

    Update the comment for DefaultFrameworks field to accurately describe its purpose
    instead of reusing the comment from ExcludeNamespaces

    armotypes/portaltypes.go [93]

    -DefaultFrameworks                         []string                                  `json:"defaultFrameworks,omitempty" bson:"defaultFrameworks,omitempty"`                                                 // fully ignore namespaces
    +DefaultFrameworks                         []string                                  `json:"defaultFrameworks,omitempty" bson:"defaultFrameworks,omitempty"`                                                 // list of default security frameworks to apply
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion correctly identifies a copy-paste error in the documentation where DefaultFrameworks field incorrectly reuses the comment from ExcludeNamespaces. The proposed fix provides an accurate and meaningful description of the field's purpose.

    7

    @dwertent
    Copy link
    Contributor Author

    @slashben can you pls review

    @slashben slashben self-requested a review December 31, 2024 04:20
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants