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

Failure in exists query for JavaDB #4620

Closed
2 tasks
afdesk opened this issue Jun 13, 2023 Discussed in #4594 · 0 comments · Fixed by #4595
Closed
2 tasks

Failure in exists query for JavaDB #4620

afdesk opened this issue Jun 13, 2023 Discussed in #4594 · 0 comments · Fixed by #4595
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@afdesk
Copy link
Contributor

afdesk commented Jun 13, 2023

Discussed in #4594

Originally posted by DaspawnW June 8, 2023

Description

During a trial to implement a hack to get the Java DB as a dedicated server #3560 I detected that the signature of the Exists method doesn't match with the SQL Query that is performed. I'm not a golang developer so maybe my bug report is wrong, but I also so far found no description that proofs that I'm wrong.

Desired Behavior

The Exists function in the javadb/client.go file calls the SelectIndexByArtifactIDAndGroupID(artifactID, groupID) out of the trivy-java-db in the argument order artifactID, groupID.

Actual Behavior

The current behavior is that the function gets called by javadb/client.go in the opposite order with groupID, artifactID.

Reproduction Steps

1. Compare https://github.com/aquasecurity/trivy/blob/main/pkg/javadb/client.go#L119 with https://github.com/aquasecurity/trivy-java-db/blob/main/pkg/db/db.go#L162

Target

None

Scanner

None

Output Format

None

Mode

None

Debug Output

nn

Operating System

nn

Version

latest main branch

Checklist

@afdesk afdesk added the kind/bug Categorizes issue or PR as related to a bug. label Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant