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

update tests #334

Merged
merged 4 commits into from May 7, 2024
Merged

update tests #334

merged 4 commits into from May 7, 2024

Conversation

nikpivkin
Copy link
Contributor

@nikpivkin nikpivkin commented Apr 12, 2024

Tests now uses a fixed version of db, java-db and a bundle of checks for data consistency.

@nikpivkin nikpivkin marked this pull request as ready for review May 2, 2024 06:39
@simar7
Copy link
Member

simar7 commented May 4, 2024

@nikpivkin looks like tests are red. Did you forget to push some changes?

@nikpivkin
Copy link
Contributor Author

@simar7 Tests are red, because there are not yet copies of the images of the dbs and the checks bundle created

username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Copy Trivy Checks
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Copy Trivy Checks
- name: Copy Trivy DB

username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Copy Trivy Checks
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- name: Copy Trivy Checks
- name: Copy Trivy Java DB

Comment on lines +16 to +35
function remove_json_fields() {
local file="$1"
if [[ "$file" == *.json ]]; then
jq 'del(.CreatedAt)' "$file" > tmp && mv tmp "$file"
fi
}

function remove_sarif_fields() {
local file="$1"
if [[ "$file" == *.sarif ]]; then
jq 'del(.runs[].tool.driver.version) | del(.runs[].originalUriBaseIds)' "$file" > tmp && mv tmp "$file"
fi
}

function remove_github_fields() {
local file="$1"
if [[ "$file" == *.gsbom ]]; then
jq 'del(.detector.version) | del(.scanned) | del(.job) | del(.ref) | del(.sha)' "$file" > tmp && mv tmp "$file"
fi
}
Copy link
Member

Choose a reason for hiding this comment

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

nice this is a clever idea.

@simar7 simar7 merged commit 6f8c237 into aquasecurity:master May 7, 2024
1 of 2 checks passed
@nikpivkin nikpivkin deleted the tests-upd branch May 7, 2024 05:21
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.

None yet

2 participants