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

test: add attack chain test scenarios mapping #334

Merged
merged 1 commit into from
Apr 30, 2024
Merged

test: add attack chain test scenarios mapping #334

merged 1 commit into from
Apr 30, 2024

Conversation

matthyx
Copy link
Contributor

@matthyx matthyx commented Apr 30, 2024

Type

Tests


Description

  • Added new test scenarios in system_test_mapping.json to enhance testing for CLI-driven configuration and vulnerability scans.
  • New scenarios include tests for default settings, specific namespace handling, and advanced features like host scanner and MITRE framework.

Changes walkthrough

Relevant files
Tests
system_test_mapping.json
Add CLI Test Scenarios for Config and Vulnerability Scans

system_test_mapping.json

  • Added multiple new test scenarios for CLI configuration and
    vulnerability scans.
  • Each scenario includes fields for target, target repositories,
    description, and skip conditions.
  • Scenarios cover default configurations, namespace
    inclusions/exclusions, host scanner enablement, and MITRE framework
    mapping.
  • +65/-1   

    PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Copy link

    PR Description updated to latest commit (3c2f843)

    Copy link

    Failed to generate code suggestions for PR

    @dwertent dwertent merged commit bed56ee into master Apr 30, 2024
    3 checks passed
    @dwertent dwertent deleted the fix-ks branch April 30, 2024 11:10
    Copy link

    PR Review

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are primarily additions to a JSON configuration file, which are straightforward to review. The complexity is low as it involves adding new test scenarios without altering existing logic.

    🧪 Relevant tests

    Yes

    🔍 Possible issues

    Incomplete Descriptions: The descriptions for all newly added test scenarios are empty. It's important to provide meaningful descriptions to help understand the purpose and scope of each test scenario.

    🔒 Security concerns

    No


    ✨ Review tool usage guide:

    Overview:
    The review tool scans the PR code changes, and generates a PR review which includes several types of feedbacks, such as possible PR issues, security threats and relevant test in the PR. More feedbacks can be added by configuring the tool.

    The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on any PR.

    • When commenting, to edit configurations related to the review tool (pr_reviewer section), use the following template:
    /review --pr_reviewer.some_config1=... --pr_reviewer.some_config2=...
    
    [pr_reviewer]
    some_config1=...
    some_config2=...
    

    See the review usage page for a comprehensive guide on using this tool.

    Copy link

    PR Code Suggestions

    CategorySuggestions                                                                                                                                                       
    Enhancement
    Add meaningful descriptions to test scenarios.

    Consider adding meaningful descriptions for each test scenario to provide context and
    purpose, which will help in understanding and maintaining the test cases.

    system_test_mapping.json [73-105]

    -"description": ""
    +"description": "This test scenario controls the cluster from CLI with default configuration scan settings."
     
    Review and update the target field to include all applicable targets.

    All new test scenarios target the "CLI". If other targets are applicable, they should be
    included, or if "CLI" is the only target, consider if this field is necessary to specify
    in every entry.

    system_test_mapping.json [69-111]

     "target": [
    -    "CLI"
    +    "CLI", "API"
     ]
     
    Maintainability
    Remove empty target_repositories fields if not used.

    It appears that the target_repositories field is consistently empty across multiple
    entries. If there are no specific repositories to target, consider removing this field to
    simplify the JSON structure unless there is a future use case anticipated.

    system_test_mapping.json [72-104]

    -"target_repositories": []
    +{}
     
    Best practice
    Specify or remove the skip_on_environment field as appropriate.

    The skip_on_environment field is empty across all new entries. If certain environments
    should skip these tests, specify them; otherwise, consider removing this field if it's not
    applicable.

    system_test_mapping.json [74-106]

    -"skip_on_environment": ""
    +{}
     

    ✨ Improve tool usage guide:

    Overview:
    The improve tool scans the PR code changes, and automatically generates suggestions for improving the PR code. The tool can be triggered automatically every time a new PR is opened, or can be invoked manually by commenting on a PR.

    • When commenting, to edit configurations related to the improve tool (pr_code_suggestions section), use the following template:
    /improve --pr_code_suggestions.some_config1=... --pr_code_suggestions.some_config2=...
    
    [pr_code_suggestions]
    some_config1=...
    some_config2=...
    

    See the improve usage page for a comprehensive guide on using this tool.

    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