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

feat(checker): libbpg checker #1237

Merged
merged 2 commits into from Jul 14, 2021
Merged

feat(checker): libbpg checker #1237

merged 2 commits into from Jul 14, 2021

Conversation

peb-peb
Copy link
Contributor

@peb-peb peb-peb commented Jul 10, 2021

why are the tests not passing? By manually looking at the files, the strings are present. Here is the output from helper script:

(venv39_CVE_Binary_tool) peb@LAPTOP-M375SCBF:/mnt/c/Users/harsh/Downloads$ python3 /mnt/d/git_stuff/cve-bin-tool/cve_bin_tool/helper_script.py libbpg-0.9.8-alt1_1.x86_64.rpm
─────────────────────────────────────────────────────────── LibbpgChecker ───────────────────────────────────────────────────────────
CONTAIN_PATTERNS = [
]
FILENAME_PATTERNS = [
        r"bpgenc",
]
VERSION_PATTERNS = [
        r"/usr/src/RPM/BUILD/libbpg-0.9.8/jctvc/TLibCommon/TComSlice.h",
        r"/usr/src/RPM/BUILD/libbpg-0.9.8/jctvc/TLibCommon/SEI.h",
        r"/usr/src/RPM/BUILD/libbpg-0.9.8/jctvc/TLibCommon/TComYuv.h",
        r"/usr/src/RPM/BUILD/libbpg-0.9.8/jctvc/TLibCommon/ContextModel3DBuffer.h",
]
VENDOR_PRODUCT = [('libbpg_project', 'libbpg')]
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2021

Codecov Report

Merging #1237 (17e4645) into main (0a5fdc3) will increase coverage by 1.76%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1237      +/-   ##
==========================================
+ Coverage   76.62%   78.38%   +1.76%     
==========================================
  Files         223      225       +2     
  Lines        4368     4377       +9     
  Branches      549      549              
==========================================
+ Hits         3347     3431      +84     
+ Misses        876      811      -65     
+ Partials      145      135      -10     
Flag Coverage Δ
longtests 78.38% <100.00%> (+1.76%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cve_bin_tool/checkers/__init__.py 95.55% <ø> (ø)
test/test_data/__init__.py 100.00% <ø> (ø)
cve_bin_tool/checkers/libbpg.py 100.00% <100.00%> (ø)
test/test_data/libbpg.py 100.00% <100.00%> (ø)
cve_bin_tool/version.py 70.00% <0.00%> (ø)
cve_bin_tool/version_scanner.py 77.24% <0.00%> (+1.37%) ⬆️
cve_bin_tool/cvedb.py 87.29% <0.00%> (+2.28%) ⬆️
cve_bin_tool/cli.py 78.18% <0.00%> (+3.03%) ⬆️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a5fdc3...17e4645. Read the comment docs.

@BreadGenie
Copy link
Contributor

BreadGenie commented Jul 11, 2021

@peb-peb the /s and the periods in the strings need to be escaped with a \.

@peb-peb peb-peb changed the title feat(checker): libbpg checker (failing) feat(checker): libbpg checker Jul 11, 2021
@peb-peb peb-peb mentioned this pull request Jul 12, 2021
12 tasks
Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

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

Hm, all of those version patterns look distinctly like pathnames. Does this work on other distro packages or just the one rpm? (It's mergeable either way, but we may want to flag it as being distro-specific the way we did with polarssl)

@peb-peb
Copy link
Contributor Author

peb-peb commented Jul 14, 2021

I was only able to find it for 2 distros (i.e. alt linux and netbsd) from https://pkgs.org/search/?q=libbpg. The pattern was consistent in these two.

@terriko
Copy link
Contributor

terriko commented Jul 14, 2021

Good enough for me. Let's merge it and if it turns out to be a problem, we can always adjust it later.

@terriko terriko merged commit d291d2d into intel:main Jul 14, 2021
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

4 participants