-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI | Fix config retrieval logic (AST-76622) (#957)
* Add test for resubmit flag and fix config retrieval logic Introduce a new integration test to verify handling of the resubmit flag during scan creation for non-existent projects, ensuring successful creation with default config. Additionally, fix the logic to retrieve configuration only when scans are available, preventing potential nil pointer dereferences. * Refactor scan model response variable assignment Simplified the retrieval of config and engines by using a single variable, `scanModelResponse`, to improve code readability and maintainability. This change consolidates access to elements of `allScansModel.Scans[0]` into one clear reference point, making the code easier to understand and modify in the future. * Handle non-existent projects in ScansMockWrapper Get method. Updated the ScansMockWrapper's Get method to return an empty configuration if the project ID is "non-existent-project". Added a test to ensure that the method behaves correctly in this scenario, verifying that an empty configuration is returned when attempting to resubmit a scan for a non-existent project. * Refactor variable name in ScansMockWrapper Get function * fix trivy vul * fix trivy vul * fix trivy vul * fix trivy vul * fix trivy vul * dix healthcheck vul --------- Co-authored-by: AlvoBen <alvo@post.bgu.ac.il>
- Loading branch information
Showing
7 changed files
with
59 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
FROM cgr.dev/chainguard/bash@sha256:4eb8145143515a9be1d04b90e911431b3e48b74ddf62948c516d300c453c845f | ||
FROM cgr.dev/chainguard/bash@sha256:1abc09ac352efdc60d855bd159b9b66df6596a174400752ae3c537b5350779a9 | ||
USER nonroot | ||
|
||
COPY cx /app/bin/cx | ||
|
||
ENTRYPOINT ["/app/bin/cx"] | ||
|
||
HEALTHCHECK NONE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters