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

restore missing tests from mapping used by Kubescape #581

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

amirmalka
Copy link
Contributor

@amirmalka amirmalka commented Jan 9, 2025

PR Type

Tests


Description

  • Added multiple test mappings used by Kubescape.

  • Included tests for various scanning scenarios (e.g., NSA, MITRE).

  • Enhanced test coverage for CLI-based scanning functionalities.

  • Assigned ownership for new tests to [email protected].


Changes walkthrough 📝

Relevant files
Tests
system_test_mapping.json
Add test mappings for Kubescape scenarios                               

system_test_mapping.json

  • Added new test mappings for Kubescape.
  • Included tests for NSA, MITRE, and custom framework scanning.
  • Defined CLI as the target for new tests.
  • Assigned ownership of new tests to [email protected].
  • +81/-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: 2 🔵🔵⚪⚪⚪
    🧪 PR contains tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Test Description

    The description "used by Kubescape" is too generic and doesn't describe the specific purpose of each test mapping. Consider adding more detailed descriptions to help other developers understand the test scenarios.

      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_custom_framework_scanning_file_scope_testing": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_custom_framework_scanning_cluster_scope_testing": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_custom_framework_scanning_cluster_and_file_scope_testing": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_mitre": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_repository": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_local_file": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_local_glob_files": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",
      "owner": "[email protected]"
    },
    "scan_local_list_of_files": {
      "target": [
        "CLI"
      ],
      "target_repositories": [],
      "description": "used by Kubescape",
      "skip_on_environment": "",

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    General
    Define specific target repositories for test execution to ensure consistent testing environments

    Consider adding target repositories for CLI-based tests to ensure consistent testing
    environments across different repositories.

    system_test_mapping.json [222-229]

     "scan_repository": {
       "target": [
         "CLI"
       ],
    -  "target_repositories": [],
    +  "target_repositories": ["kubescape", "helm-chart"],
       "description": "used by Kubescape",
       "skip_on_environment": "",
       "owner": "[email protected]"
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding specific target repositories is important for test consistency and reproducibility. The suggestion helps prevent potential test environment issues and ensures more reliable test execution.

    7
    Improve test documentation by adding clear and descriptive test case summaries

    Add more descriptive test descriptions beyond just "used by Kubescape" to help other
    developers understand the purpose and scope of each test case.

    system_test_mapping.json [177-184]

     "scan_nsa": {
       "target": [
         "CLI"
       ],
       "target_repositories": [],
    -  "description": "used by Kubescape",
    +  "description": "Validates NSA security framework scanning functionality via CLI",
       "skip_on_environment": "",
       "owner": "[email protected]"
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: The suggestion improves test documentation clarity by replacing generic descriptions with more specific ones, helping developers understand test purposes better. However, this is a moderate priority enhancement rather than a critical fix.

    5

    @amirmalka amirmalka merged commit 4497245 into master Jan 9, 2025
    3 checks passed
    Copy link

    github-actions bot commented Jan 9, 2025

    Failed to generate code suggestions for PR

    @matthyx matthyx deleted the missing-tests branch January 10, 2025 06:19
    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