checkov icon indicating copy to clipboard operation
checkov copied to clipboard

feat(sca): using the new api license/get-licenses-violations instead of packages/get-licenses-violations (which is deprecated)

Open itai1357 opened this issue 1 year ago • 0 comments

User description

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

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

New/Edited policies (Delete if not relevant)

Description

Include a description of what makes it a violation and any relevant external links.

Fix

How does someone fix the issue in code and/or in runtime?

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

Generated description

Dear maintainer, below is a concise technical summary of the changes proposed in this PR:

Replace the deprecated API endpoint packages/get-licenses-violations with the new license/get-licenses-violations in the get_license_statuses and get_license_statuses_async functions. Enhance error logging by including request input and response details. Introduce a utility function chunk_array to split arrays into smaller chunks. Update tests to reflect the new API endpoint and add tests for the chunk_array function.

TopicDetails
Array Chunking Introduce a utility function chunk_array to split arrays into smaller chunks.
Modified files (2)
  • checkov/common/util/array_utils.py
  • tests/common/utils/test_array_utils.py
Latest Contributors(0)
EmailCommitDate
Error Logging Enhancement Enhance error logging by including request input and response details in the get_license_statuses and get_license_statuses_async functions.
Modified files (1)
  • checkov/common/sca/output.py
Latest Contributors(2)
EmailCommitDate
44339653+itai1357@user...fix-sca-Revert-feat-sc...April 16, 2024
[email protected]chore-update-bc-python...November 13, 2023
API Endpoint Update Replace the deprecated API endpoint packages/get-licenses-violations with the new license/get-licenses-violations in the get_license_statuses and get_license_statuses_async functions.
Modified files (4)
  • tests/sca_image/conftest.py
  • tests/sca_image/test_runner.py
  • checkov/common/sca/output.py
  • tests/common/sca/test_output.py
Latest Contributors(2)
EmailCommitDate
[email protected]feat-general-Image-Ref...June 03, 2024
44339653+itai1357@user...fix-sca-Revert-feat-sc...April 16, 2024
This pull request is reviewed by Baz. Join @itai1357 and the rest of your team on (Baz).

itai1357 avatar Apr 17 '24 05:04 itai1357