René's URL Explorer Experiment


Title: Rework inheritance for cascading scans · Issue #789 · secureCodeBox/secureCodeBox · GitHub

Open Graph Title: Rework inheritance for cascading scans · Issue #789 · secureCodeBox/secureCodeBox

X Title: Rework inheritance for cascading scans · Issue #789 · secureCodeBox/secureCodeBox

Description: ➹ New Feature implementation request While discussing #757, we found a few strange corner cases for how inheritance works in cascading scans, located in the logic for purging inherited values. Briefly, the problem looks like this: Assume...

Open Graph Description: ➹ New Feature implementation request While discussing #757, we found a few strange corner cases for how inheritance works in cascading scans, located in the logic for purging inherited values. Brie...

X Description: ➹ New Feature implementation request While discussing #757, we found a few strange corner cases for how inheritance works in cascading scans, located in the logic for purging inherited values. Brie...

Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/issues/789

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Rework inheritance for cascading scans","articleBody":"## ➹ New Feature implementation request\r\nWhile discussing #757, we found a few strange corner cases for how inheritance works in cascading scans, located in the logic for purging inherited values. Briefly, the problem looks like this:\r\n\r\nAssume we have a scan with the label-based HookSelector `defectdojo: false` (to avoid running a DefectDojo hook that has this label). The scan then triggers a cascadingScan that overwrites the label-based selector with `defectdojo: true`. This cascaded scan then triggers another cascadingScan rule.\r\n\r\nGiven the currently expected behavior of cascading scans and inheritance, the updated labelSelector [should be \"purged\"](https://github.com/secureCodeBox/secureCodeBox/blob/1c500f84881fede57740c963bda98b8defa6f3ba/hooks/cascading-scans/hook/scan-helpers.ts#L144-L146), i.e., changes introduced by the first cascading scan should be reverted back to the state of the original scan. However, the current implementation will instead [delete the label entirely](https://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r739178568) due to limitations in \"how far back\" we can iterate to the originating scans.\r\n\r\n@EndPositive [made some suggestions on how this could be addressed](https://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r740009166), quoted here:\r\n\r\n\u003e ## Option 1 - Retrieve root scan to create cascaded scan\r\n\u003e Using `ownerReferences`, the Cascading Scans hook could recurse all the way back to the initial/root scan. Then merge the entries from the matched Cascading Rule.\r\n\u003e \r\n\u003e ## Option 2 - Add \"Engagement\" CRD for global entries\r\n\u003e We could add a global CRD where we define global entries that should be inherited to each scan within that engagement. Cascading Scans hook retains same behaviour as Option 1 but now retrieving the Engagement resource.\r\n\u003e \r\n\u003e ## Option 3 - Specify inheritance per entry\r\n\u003e For ultimate customization, users should be able to configure inheritance per entry. We could update our CRD's such that each `env`, `initContainer`, etc. contains an extra field `persist` which controls whether that entry should be passed on to cascaded scans. Kubernetes map types (e.g. labels) would be converted into structs.\r\n\r\nI would add that as a novice SCB user, I was surprised that the purge functionality even existed when I was reviewing that PR - this was not what I expected the system to behave like at all. So, perhaps we should figure out if this whole purging thing should even take place by default. @EndPositive also [had some ideas for specifying a larger set of possible inheritance behaviors](https://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r738349922), quoted below:\r\n\r\n\u003e - `merge`: simply keeps adding matchers to each cascaded scan. Not sure if this has an actual use case, but this was default behavior for a long time.\r\n\u003e - `mergeAndPurge`: required when the rule's entries should only be applied to the current scan. Most useful when you want to add environment variables to a cascaded scan, but not to the 'children' of that cascaded scan. Example would be scanner configuration enthronement variables, which only apply to the current scanner and not the child scanners. Same could be said about the `hookSelector`, for which you might want to disable DefectDojo import for a cascaded scan (like `ncrack`), but not for the 'children' of that cascaded scan (`ncrack` ssh -\u003e remote system enumeration through).\r\n\u003e - `discard`: when your initial scan has scanner specific entries that should not come over to cascaded scans, the cascaded scan can choose to ignore/discard those entries. E.g. you add environment variables to `amass` for private DNS authentication, but don't want to have these environment variables in cascaded `nmap`.\r\n\u003e - `discardTemporary`: the initial scan specifies that DefectDojo should not run. However you still want to run DefectDojo for `nmap` findings. Think of `amass` -\u003e `nmap` -\u003e `sslyze`. `nmap`'s cascading rule temporarily discard the initial scan's hook selector, and `sslyze` retrieves it again (if it enabled a merge option).\r\n\r\nThis issue is likely closer to an epic than a user story. @J12934 was also saying that the whole cascading scan thing being implemented as a hook instead of a core feature of the operator is more of a historical accident as well, and one that could be changed if someone wanted to invest some time into pulling the behavior into the operator itself. But that is a whole separate issue, which I just wanted to drop in here because it may influence how we think about these changes.\r\n\r\nThis may be a candidate for a version 4.0 of the SCB, as I am fairly sure that addressing these points will lead to a breaking change _somewhere_.","author":{"url":"https://github.com/malexmave","@type":"Person","name":"malexmave"},"datePublished":"2021-11-01T08:30:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/789/secureCodeBox/issues/789"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:83db363a-edcf-af82-1853-137b5366524e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDBD2:D2DF1:92E66F:9E92E0:698FA8AF
html-safe-nonce4b335f2fb46a73da7537668d385fe1701071247f89ab825c34e45713935a1019
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkQyOkQyREYxOjkyRTY2Rjo5RTkyRTA6Njk4RkE4QUYiLCJ2aXNpdG9yX2lkIjoiMjc5MDg5NDk5MjIzNDYyMTEwMyIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9
visitor-hmac9c75a0af3b52650b388ebde5cbcfc0e4e004c93ed77a122d65d609d7b45104f0
hovercard-subject-tagissue:1040911547
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/secureCodeBox/secureCodeBox/789/issue_layout
twitter:imagehttps://opengraph.githubassets.com/7715a480cea76c106ffa828dbb3c7d1503ab82338ae49ca110f0352cd231a48a/secureCodeBox/secureCodeBox/issues/789
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/7715a480cea76c106ffa828dbb3c7d1503ab82338ae49ca110f0352cd231a48a/secureCodeBox/secureCodeBox/issues/789
og:image:alt➹ New Feature implementation request While discussing #757, we found a few strange corner cases for how inheritance works in cascading scans, located in the logic for purging inherited values. Brie...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemalexmave
hostnamegithub.com
expected-hostnamegithub.com
Noneff0b5286b4f7cd2eb22d357a0ae8fb9a0ae1eaf6abfbae7410c3b315d16414e1
turbo-cache-controlno-preview
go-importgithub.com/secureCodeBox/secureCodeBox git https://github.com/secureCodeBox/secureCodeBox.git
octolytics-dimension-user_id34573705
octolytics-dimension-user_loginsecureCodeBox
octolytics-dimension-repository_id80711933
octolytics-dimension-repository_nwosecureCodeBox/secureCodeBox
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id80711933
octolytics-dimension-repository_network_root_nwosecureCodeBox/secureCodeBox
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release5268d66f533eb3b2e65a6a398a739f35827fd64a
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/secureCodeBox/secureCodeBox/issues/789#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2F789
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2F789
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=secureCodeBox%2FsecureCodeBox
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/789
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/789
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/789
secureCodeBox https://github.com/secureCodeBox
secureCodeBoxhttps://github.com/secureCodeBox/secureCodeBox
Notifications https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Fork 179 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Star 955 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Code https://github.com/secureCodeBox/secureCodeBox
Issues 71 https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests 4 https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects 1 https://github.com/secureCodeBox/secureCodeBox/projects
Security 1 https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
Code https://github.com/secureCodeBox/secureCodeBox
Issues https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests https://github.com/secureCodeBox/secureCodeBox/pulls
Discussions https://github.com/secureCodeBox/secureCodeBox/discussions
Actions https://github.com/secureCodeBox/secureCodeBox/actions
Projects https://github.com/secureCodeBox/secureCodeBox/projects
Security https://github.com/secureCodeBox/secureCodeBox/security
Insights https://github.com/secureCodeBox/secureCodeBox/pulse
New issuehttps://github.com/login?return_to=https://github.com/secureCodeBox/secureCodeBox/issues/789
New issuehttps://github.com/login?return_to=https://github.com/secureCodeBox/secureCodeBox/issues/789
Rework inheritance for cascading scanshttps://github.com/secureCodeBox/secureCodeBox/issues/789#top
architectureArchitecture changeshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22architecture%22
breakingChanges requiring a major releasehttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22breaking%22
cascading-scanshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22cascading-scans%22
https://github.com/malexmave
https://github.com/malexmave
malexmavehttps://github.com/malexmave
on Nov 1, 2021https://github.com/secureCodeBox/secureCodeBox/issues/789#issue-1040911547
#757https://github.com/secureCodeBox/secureCodeBox/pull/757
should be "purged"https://github.com/secureCodeBox/secureCodeBox/blob/1c500f84881fede57740c963bda98b8defa6f3ba/hooks/cascading-scans/hook/scan-helpers.ts#L144-L146
delete the label entirelyhttps://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r739178568
@EndPositivehttps://github.com/EndPositive
made some suggestions on how this could be addressedhttps://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r740009166
@EndPositivehttps://github.com/EndPositive
had some ideas for specifying a larger set of possible inheritance behaviorshttps://github.com/secureCodeBox/secureCodeBox/blob/main/hooks/cascading-scans/hook/scan-helpers.ts#discussion_r738349922
@J12934https://github.com/J12934
architectureArchitecture changeshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22architecture%22
breakingChanges requiring a major releasehttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22breaking%22
cascading-scanshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22cascading-scans%22
secureCodeBoxhttps://github.com/orgs/secureCodeBox/projects/6
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.