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
update tests #334
Conversation
@nikpivkin looks like tests are red. Did you forget to push some changes? |
@simar7 Tests are red, because there are not yet copies of the images of the dbs and the checks bundle created |
.github/workflows/sync-trivy-db.yaml
Outdated
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy Trivy Checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Copy Trivy Checks | |
- name: Copy Trivy DB |
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Copy Trivy Checks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: Copy Trivy Checks | |
- name: Copy Trivy Java DB |
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 | ||
} |
There was a problem hiding this comment.
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.
Tests now uses a fixed version of db, java-db and a bundle of checks for data consistency.