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

fix(github): changed the schema to accept no description for org #3589

Merged
merged 3 commits into from
Oct 2, 2022

Conversation

marynaKK
Copy link
Contributor

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

Description

Update of organization schema for GitHub.

Description

In GitHub, the organization security schema had a description field set to match a string although None is a legal value too.
This caused the data returned from the GitHub API to mismatch the schema in this case, and hence no github_conf file for org security was created. In this case checks CKV_GITHUB_1-3 were skipped.

Fix

Change the schema to match both.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@marynaKK marynaKK requested a review from maxamel September 29, 2022 14:37
Copy link
Contributor

@gruebel gruebel left a comment

Choose a reason for hiding this comment

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

nice work 🏖️

assert result
result1 = dal.get_organization_security()

mock_data2 = {
Copy link
Contributor

Choose a reason for hiding this comment

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

can you create a separate test function for this case and name it accordingly, something like test_org_security with_empty_ description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks :) changed it!

@marynaKK marynaKK merged commit edd25ee into master Oct 2, 2022
@marynaKK marynaKK deleted the fix-ckv-github-1-2-3 branch October 2, 2022 06:39
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.

3 participants