Title: Introduce reverse matches on cascading rules to enforce scope · Issue #761 · secureCodeBox/secureCodeBox · GitHub
Open Graph Title: Introduce reverse matches on cascading rules to enforce scope · Issue #761 · secureCodeBox/secureCodeBox
X Title: Introduce reverse matches on cascading rules to enforce scope · Issue #761 · secureCodeBox/secureCodeBox
Description: ➹ New Feature implementation request Is your feature request related to a problem? As a pentester, I want to gain confidence in letting run secureCodeBox cascading rules unattended, so that I have assurance that secureCodeBox will only s...
Open Graph Description: ➹ New Feature implementation request Is your feature request related to a problem? As a pentester, I want to gain confidence in letting run secureCodeBox cascading rules unattended, so that I have ...
X Description: ➹ New Feature implementation request Is your feature request related to a problem? As a pentester, I want to gain confidence in letting run secureCodeBox cascading rules unattended, so that I have ...
Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/761
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Introduce reverse matches on cascading rules to enforce scope","articleBody":"## ➹ New Feature implementation request\r\n\r\n### Is your feature request related to a problem?\r\nAs a pentester, I want to gain confidence in letting run secureCodeBox cascading rules unattended, so that I have assurance that secureCodeBox will only scan in-scope targets given the engagement.\r\n\r\nCurrently, cascading rules are triggered based on whether a static value exists in the finding.\r\n```yaml\r\nspec:\r\n matches:\r\n anyOf:\r\n - category: \"Subdomain\"\r\n osi_layer: \"NETWORK\"\r\n scanSpec:\r\n scanType: \"nmap\"\r\n parameters:\r\n # Target Port of the finding\r\n - \"{{location}}\"\r\n```\r\n\r\nIt is however not possible to verify whether the matched subdomain is present in the given scope.\r\n\r\nA practical example engagement scope:\r\n - `example.com`\r\n - `subdomain.example.com`\r\n - `12.34.56.78/24`\r\n\r\nA pentester would like to investigate whether more subdomains exist so runs AMASS, it returns `example.com`, `subdomain.example.com`, and `subdomain2.example.com`. Nmap is triggered on all of them, while `subdomain2.example.com` was out-of-scope. Furthermore, it should have been verified whether `example.com` and `subdomain.example.com` even resolve to an IP in `12.34.56.78/12`.\r\n\r\n### Describe the solution you'd like\r\nIn the cascading rule spec, we can introduce a field allowing rule developers to do reverse matching on scan labels.\r\n\r\n```yaml\r\nmetadata:\r\n labels:\r\n \"engagement.scope/domains\": \"example.com,subdomain.example.com\"\r\n \"engagement.scope/cidr\": \"12.34.56.78/24\"\r\n```\r\n\r\nThen in cascading rule yaml:\r\n```yaml\r\nspec:\r\n matches:\r\n scanSelector:\r\n allOf:\r\n - key: \"engagement.scope/domains\"\r\n operator: Contains\r\n value: {{attributes.host}}\r\n - key: \"engagement.scope/cidr\"\r\n operator: InCIDR\r\n value: {{attributes.ip}}\r\n anyOf:\r\n - category: \"Subdomain\"\r\n osi_layer: \"NETWORK\"\r\n scanSpec:\r\n scanType: \"nmap\"\r\n parameters:\r\n # Target Port of the finding\r\n - \"{{location}}\"\r\n```\r\n\r\n`scanSelector` would be a similar field to the Kubernetes-native `labelSelector`, but fully interpreted in the cascading scans hook. This also allows us to define special operators (like Contains or InCIDR).\r\n\r\n`allOf` is used in the example above. Would `anyOf` or `noneOf` have any further use cases?\r\n\r\nIn any case, I'd like some feedback on the problem and potential solution :thinking: . What do you think?","author":{"url":"https://github.com/EndPositive","@type":"Person","name":"EndPositive"},"datePublished":"2021-10-22T14:20:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/761/secureCodeBox/issues/761"}
| 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:2bd97bcb-d58f-daad-c3f8-7c62b17fafa5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A1B6:25066E:46B12C:5915B4:69925D1D |
| html-safe-nonce | b5fbe83d4242f453051c83c5e8830b40e42a9259366db217220d652973a8d71f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMUI2OjI1MDY2RTo0NkIxMkM6NTkxNUI0OjY5OTI1RDFEIiwidmlzaXRvcl9pZCI6IjQwOTQ5ODM2ODE5MTUxMTY4MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3dda4d87673dfa1baeee3621c3c36598afa915df053bc228ab033585df900a00 |
| hovercard-subject-tag | issue:1033636492 |
| 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/761/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de106def9d8e5e1e27a19caae3f4b57fd6598c2f7df1620e5b068b0f20625320/secureCodeBox/secureCodeBox/issues/761 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de106def9d8e5e1e27a19caae3f4b57fd6598c2f7df1620e5b068b0f20625320/secureCodeBox/secureCodeBox/issues/761 |
| og:image:alt | ➹ New Feature implementation request Is your feature request related to a problem? As a pentester, I want to gain confidence in letting run secureCodeBox cascading rules unattended, so that I have ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EndPositive |
| 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 | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width