Skip to content

Conversation

@cx-miguel-silva
Copy link
Collaborator

Reason for Proposed Changes

  • undetected circular references

Proposed Changes

  • fix detection for direct circular references with relative path
    • tests todo
  • WIP - detect and disable file caching for indirect circular references

I submit this contribution under the Apache-2.0 license.

@cx-miguel-silva cx-miguel-silva self-assigned this Apr 1, 2025
@github-actions github-actions bot added feature New feature kubernetes Kubernetes query labels Apr 1, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Apr 1, 2025

kics-logo

KICS version: v2.1.7

Category Results
CRITICAL CRITICAL 0
HIGH HIGH 0
MEDIUM MEDIUM 0
LOW LOW 0
INFO INFO 0
TRACE TRACE 0
TOTAL TOTAL 0
Metric Values
Files scanned placeholder 1
Files parsed placeholder 1
Files failed to scan placeholder 0
Total executed queries placeholder 47
Queries failed to execute placeholder 0
Execution time placeholder 0

@cx-artur-ribeiro cx-artur-ribeiro changed the title feat(resolver): Kubernetes circular dependency is causing resource exhaustion feat(resolver): kubernetes circular dependency is causing resource exhaustion Apr 14, 2025
cx-artur-ribeiro and others added 22 commits April 14, 2025 17:46
… on TestResolver_Resolve_Without_ResolveReferences (5/8)
@cx-artur-ribeiro cx-artur-ribeiro marked this pull request as ready for review May 2, 2025 08:40
@cx-artur-ribeiro cx-artur-ribeiro requested a review from a team as a code owner May 2, 2025 08:40
@cx-artur-ribeiro cx-artur-ribeiro self-assigned this May 2, 2025
Copy link
Collaborator Author

@cx-miguel-silva cx-miguel-silva left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

Copy link
Contributor

@cx-rui-araujo cx-rui-araujo left a comment

Choose a reason for hiding this comment

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

LGTM 🐐

@cx-artur-ribeiro cx-artur-ribeiro merged commit ef44a59 into master May 13, 2025
25 checks passed
@cx-artur-ribeiro cx-artur-ribeiro deleted the AST-88601 branch May 13, 2025 16:13
JonasCordsen pushed a commit to JonasCordsen/kics that referenced this pull request Jun 11, 2025
…haustion (Checkmarx#7421)

* stage

* draft check for circular references

* comment failing test and solve lint

* remove stashed currentResolutionPath from previous resolved files allowing once resolutions

* remove wrong comments and add no lint statement

* fix TestResolver_Resolve_Ansible_Vars unit test

* fix 2 tests on TestResolver_Resolve_With_ResolveReferences and 1 test on TestResolver_Resolve_Without_ResolveReferences (5/8)

* fix all unit tests

* add lint ignore

* remove lint ignore

* add Test_checkCircularReference tests

* remove deprecated function ioutil.ReadFile

* remove unnecessary comments

* first json temporary solution and handleMap RefMedatada refactor

* add resolution for json files

* solve unit tests although they seem to be wrongly implementedgi

* refactor code and solve unit tests

* fix lint issues and e2e test

* add e2e that compares the payload between json and yaml files

* fix mixing want status and lint lll

* add missing payloads

* refactor payload, folder name and fix e2e

* change comments on e2e

* refactor names to be according to other files naming conventions

* remove duplicated unit test

* fix typo on e2e comment

* remove resolved file at least once solution

* update e2e 099 payload with new implemented code

* update file and id from e2e payload

* remove currentResolutionPath from TestResolver

* revert addition of \n to test error output

* add Clear mechanism on ResolvedFilesCache to force re-resolution of all files

* add nolint gocyclo

* check if the file can or cannot be cached during the for cycle

---------

Co-authored-by: ArturRibeiro-CX <[email protected]>
Co-authored-by: ArturRibeiro-CX <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature kubernetes Kubernetes query

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants