Title: Invalid Scheduled Scan name · Issue #2706 · secureCodeBox/secureCodeBox · GitHub
Open Graph Title: Invalid Scheduled Scan name · Issue #2706 · secureCodeBox/secureCodeBox
X Title: Invalid Scheduled Scan name · Issue #2706 · secureCodeBox/secureCodeBox
Description: 🐞 Bug report Describe the bug Auto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the container image name there are additional char...
Open Graph Description: 🐞 Bug report Describe the bug Auto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the contai...
X Description: 🐞 Bug report Describe the bug Auto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the contai...
Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/2706
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid Scheduled Scan name","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\u003c!-- A clear and concise description of what the bug is. --\u003e\r\nAuto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the container image name there are additional characters allowed, such as \"_\". I think this should be taken into account and discard/replace characters that are not allowed by metadata.name while creating the scheduled scan name.\r\n### Steps To Reproduce\r\n\r\nSteps to reproduce the behavior:\r\n1. Install auto-discovery and activate container scans\r\n2. Deploy a pod with a container which has in its image name an invalid character such as \"_\", which is an allowed character for the container image name\r\n3. Check autodiscovery logs and see that it will fail to create the scheduled scan:\r\n\r\nFailed to create scheduled scan, metadata.name: Invalid value: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')\"}\r\n\r\nWhile is good to not have such names in container image names, it can still happen.\r\n\r\n\r\n### Expected behavior\r\n \r\nThe expected behaviour is for the autodiscovery controller to detect such names and fix them before creating the scan.\r\n\r\n### System (please complete the following information):\r\n\r\n - secureCodeBox 4.9.0\r\n - OS: Ubuntu\r\n - Kubernetes Version: Server Version: version.Info{Major:\"1\", Minor:\"29\", GitVersion:\"v1.29.5\", GitCommit:\"59755ff595fa4526236b0cc03aa2242d941a5171\", GitTreeState:\"clean\", BuildDate:\"2024-05-22T15:00:52Z\", GoVersion:\"go1.21.9\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n - Docker Version: N\\A\r\n - Browser: N\\A\r\n\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/adrianmarcu18","@type":"Person","name":"adrianmarcu18"},"datePublished":"2024-10-11T11:26:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2706/secureCodeBox/issues/2706"}
| 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:c8e0fb0e-37e7-6308-aa2d-11375756396c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B136:20B8A3:5BC5C6:733E35:6990005E |
| html-safe-nonce | 6e2e0bdf8d18732b32d4db6e997510fdf2b1acbfb029b882a03bb111b8abc852 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTM2OjIwQjhBMzo1QkM1QzY6NzMzRTM1OjY5OTAwMDVFIiwidmlzaXRvcl9pZCI6Ijc1OTA0NjcyNDk4MzM1MDg5NTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 314ac89f3d6e5a091cf6b216f93a87f6a05b96d5e17be8453b633a7cf5f5a489 |
| hovercard-subject-tag | issue:2581134299 |
| 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/2706/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdf641801283def6da147ecb3d6331ae599aeb707a0c3c71b3db903b04ace18c/secureCodeBox/secureCodeBox/issues/2706 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdf641801283def6da147ecb3d6331ae599aeb707a0c3c71b3db903b04ace18c/secureCodeBox/secureCodeBox/issues/2706 |
| og:image:alt | 🐞 Bug report Describe the bug Auto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the contai... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adrianmarcu18 |
| 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 | 3b33c5aedc9808f45bc5fcf0b1e4404cf749dac7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width