Title: Trivy Parser Creates Malformed Location URL · Issue #2324 · secureCodeBox/secureCodeBox · GitHub
Open Graph Title: Trivy Parser Creates Malformed Location URL · Issue #2324 · secureCodeBox/secureCodeBox
X Title: Trivy Parser Creates Malformed Location URL · Issue #2324 · secureCodeBox/secureCodeBox
Description: 🐞 Bug report Describe the bug We do the following scan by Trivy: apiVersion: "execution.securecodebox.io/v1" kind: Scan metadata: name: "trivy-k8s-1" annotations: defectdojo.securecodebox.io/product-type-name: Infra defectdojo.securecode...
Open Graph Description: 🐞 Bug report Describe the bug We do the following scan by Trivy: apiVersion: "execution.securecodebox.io/v1" kind: Scan metadata: name: "trivy-k8s-1" annotations: defectdojo.securecodebox.io/produc...
X Description: 🐞 Bug report Describe the bug We do the following scan by Trivy: apiVersion: "execution.securecodebox.io/v1" kind: Scan metadata: name: "trivy-k8s-1" annotations: defectdojo.sec...
Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/2324
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Trivy Parser Creates Malformed Location URL","articleBody":"## 🐞 Bug report\r\n\u003c!--\r\nThank you for reporting an issue in our project 🙌\r\n\r\nBefore opening a new issue, please make sure that we do not have any duplicates already open. You can ensure this by searching the issue list for this repository. If there is a duplicate, please close your issue and add a comment to the existing issue instead.\r\n--\u003e\r\n\r\n### Describe the bug\r\n\r\nWe do the following scan by Trivy:\r\n```\r\napiVersion: \"execution.securecodebox.io/v1\"\r\nkind: Scan\r\nmetadata:\r\n name: \"trivy-k8s-1\"\r\n annotations:\r\n defectdojo.securecodebox.io/product-type-name: Infra\r\n defectdojo.securecodebox.io/product-name: infra-cluster\r\n defectdojo.securecodebox.io/engagement-name: \"Trivy k8s scan\"\r\n defectdojo.securecodebox.io/test-title: \"Trivy k8s weekly scan\"\r\nspec:\r\n scanType: \"trivy-k8s\"\r\n parameters:\r\n - \"-d\"\r\n - \"--timeout\"\r\n - \"30m\"\r\n - \"--tolerations\"\r\n - \"gitlab_runners=true:NoSchedule\"\r\n - \"--components\"\r\n - \"workload\"\r\n - \"--scanners\"\r\n - \"vuln\"\r\n - \"-n\"\r\n - \"gitlab\"\r\n - \"pods\"\r\n volumes:\r\n - name: dockersocket\r\n hostPath:\r\n path: /run/containerd/containerd.sock\r\n - name: db-cache\r\n persistentVolumeClaim:\r\n claimName: trivy-k8s-database\r\n volumeMounts:\r\n - name: dockersocket\r\n mountPath: /run/containerd/containerd.sock\r\n - name: db-cache\r\n mountPath: /root/.cache/trivy\r\n```\r\n\r\nScan and parse stages go just fine. But in the `Persistence-defectdojo hook` we see a lot of warnings like this:\r\n\r\n```\r\n2024-02-29 17:17:26 WARN SecureCodeBoxFindingsToDefectDojoMapper:89 - Couldn't parse the secureCodeBox location, because it: java.lang.IllegalArgumentException: Illegal character in opaque part at index 10: Namespace: 'gitlab' / Kind: 'Pod' / Name: 'runner--ykq-n2m-project-8-concurrent-0-na4oov1f' is not a vailid uri: Namespace: 'gitlab' / Kind: 'Pod' / Name: 'runner--ykq-n2m-project-8-concurrent-0-na4oov1f'\r\n2024-02-29 17:17:26 WARN SecureCodeBoxFindingsToDefectDojoMapper:89 - Couldn't parse the secureCodeBox location, because it: java.lang.IllegalArgumentException: Illegal character in opaque part at index 10: Namespace: 'gitlab' / Kind: 'Pod' / Name: 'runner--ykq-n2m-project-8-concurrent-0-na4oov1f' is not a vailid uri: Namespace: 'gitlab' / Kind: 'Pod' / Name: 'runner--ykq-n2m-project-8-concurrent-0-na4oov1f'\r\n```\r\n\r\n### Steps To Reproduce\r\n\u003c!--\r\nSteps to reproduce the behavior:\r\n1. Go to '...'\r\n2. Click on '....'\r\n3. Scroll down to '....'\r\n4. See error\r\n--\u003e\r\n\r\n### Expected behavior\r\n\u003c!-- A clear and concise description of what you expected to happen. --\u003e\r\n\r\n### System (please complete the following information):\r\n\u003c!--\r\n - secureCodeBox Version/Release\r\n - OS: [e.g. iOS]\r\n - Kubernetes Version [command: `kubectl version`]\r\n - Docker Version [command: `docker -v`]\r\n - Browser [e.g. chrome, safari, firefox,...]\r\n--\u003e\r\n\r\n- operator-4.4.0\r\n- trivy-4.4.1\r\n- persistence-defectdojo-4.4.1\r\n\r\n### Screenshots / Logs\r\n\u003c!-- If applicable, add screenshots to help explain your problem. --\u003e\r\n\r\n### Additional context\r\n\u003c!-- Add any other context about the problem here. --\u003e\r\n","author":{"url":"https://github.com/danil-smirnov","@type":"Person","name":"danil-smirnov"},"datePublished":"2024-02-29T17:41:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/2324/secureCodeBox/issues/2324"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d6b053f6-3119-162e-e2e0-26ad0273899f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EA76:119F1E:1175677:168D54A:698FD72D |
| html-safe-nonce | 06650e0222265a5ed78330cb304acef63d9c13164203960d6ad1b81aaad51788 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQTc2OjExOUYxRToxMTc1Njc3OjE2OEQ1NEE6Njk4RkQ3MkQiLCJ2aXNpdG9yX2lkIjoiMTgzNzYwNTU5NzgyNDgzNzU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9d9becad6784952e810746868543aa0ca766656712a09a1288447720a3b3fad6 |
| hovercard-subject-tag | issue:2161784341 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/secureCodeBox/secureCodeBox/2324/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3e8cb8bfdb4c3db1c624b2787dceae6a5cc8ffe63d23fb6db3ca8c8e2c95d7d7/secureCodeBox/secureCodeBox/issues/2324 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3e8cb8bfdb4c3db1c624b2787dceae6a5cc8ffe63d23fb6db3ca8c8e2c95d7d7/secureCodeBox/secureCodeBox/issues/2324 |
| og:image:alt | 🐞 Bug report Describe the bug We do the following scan by Trivy: apiVersion: "execution.securecodebox.io/v1" kind: Scan metadata: name: "trivy-k8s-1" annotations: defectdojo.securecodebox.io/produc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | danil-smirnov |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/secureCodeBox/secureCodeBox git https://github.com/secureCodeBox/secureCodeBox.git |
| octolytics-dimension-user_id | 34573705 |
| octolytics-dimension-user_login | secureCodeBox |
| octolytics-dimension-repository_id | 80711933 |
| octolytics-dimension-repository_nwo | secureCodeBox/secureCodeBox |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 80711933 |
| octolytics-dimension-repository_network_root_nwo | secureCodeBox/secureCodeBox |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d320682233dfd4d28c0b30554a564c2fcd229032 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width