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

Fix 'err:parameter node not found' for dotted reference #526

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AdrieVanDijk
Copy link

I had a problem with a harbor webhook
Part of the payload sent by the IMAGE SCAN COMPLETED notification, is:

         "scan_overview": {
           "application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0": {
             "complete_percent": 100,
             "duration": 42,

             "end_time": "2021-01-22T20:27:27.404922Z",
             "report_id": "87962b6f-589c-4dbf-9972-2646cae2cee4",
             "scan_status": "Success",
             "scanner": {
               "name": "Trivy",
               "vendor": "Aqua Security",
               "version": "v0.9.2"
             },
             "severity": "Medium",
             "start_time": "2021-01-22T20:26:45.096622Z",
             "summary": {
               "fixable": 6,
               "summary": {
                 "Low": 21,
                 "Medium": 7
               },
               "total": 28
             }
           }
         },

In order to extract the "Severity" i have to use the path:

scan_overview.application/vnd.scanner.adapter.vuln.report.harbor+json; version=1.0.severity

This gave error "parameter node not found', because paths with dotted references only worked when the reference with the dots was at the end of the path.
This change fixes that.

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.

1 participant