René's URL Explorer Experiment


Title: Add defaults for cascading inherit fields and disable omitEmpty by EndPositive · Pull Request #687 · secureCodeBox/secureCodeBox · GitHub

Open Graph Title: Add defaults for cascading inherit fields and disable omitEmpty by EndPositive · Pull Request #687 · secureCodeBox/secureCodeBox

X Title: Add defaults for cascading inherit fields and disable omitEmpty by EndPositive · Pull Request #687 · secureCodeBox/secureCodeBox

Description: Closes #683 Description This PR, if applied, adds default values to the cascading inherit fields. Using omitEmpty on booleans has an implicit default of omitting false values completely golang/go#13284. Since the cascading hook regards inheritLabels and inheritAnnotations undefined field as true, it was impossible to set those fields to false. secureCodeBox/hooks/cascading-scans/hook/hook.ts Lines 161 to 165 in 79a279a let { inheritAnnotations, inheritLabels, inheritEnv, inheritVolumes } = scan.spec.cascades; return { annotations: mergeInheritedMap(scan.metadata.annotations, scanAnnotations, inheritAnnotations), labels: mergeInheritedMap(scan.metadata.labels, scanLabels, inheritLabels), secureCodeBox/hooks/cascading-scans/hook/scan-helpers.ts Lines 73 to 81 in 79a279a export function mergeInheritedMap(parentProps, ruleProps, inherit: boolean = true) { if (!inherit) { parentProps = {}; } return { ...parentProps, ...ruleProps // ruleProps overwrites any duplicate keys from parentProps } } Fixed by setting the default at CRD level with kubebuilders default annotation and deleting the omitEmpty tag. Results in all cascading scans to have the following fields by default: cascades: inheritAnnotations: true inheritEnv: false inheritLabels: true inheritVolumes: false matchExpressions: - key: securecodebox.io/intensive operator: In values: - light - medium - high - key: securecodebox.io/invasive operator: In values: - non-invasive - invasive inheritLabels and inheritAnnotations true by default #334 inheritEnv and inheritVolumes false by default #538 (comment) Checklist Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests. Make sure npm test runs for the whole project. Make codeclimate checks happy

Open Graph Description: Closes #683 Description This PR, if applied, adds default values to the cascading inherit fields. Using omitEmpty on booleans has an implicit default of omitting false values completely golang/go#1...

X Description: Closes #683 Description This PR, if applied, adds default values to the cascading inherit fields. Using omitEmpty on booleans has an implicit default of omitting false values completely golang/go#1...

Opengraph URL: https://github.com/secureCodeBox/secureCodeBox/pull/687

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:b2ef2fc4-2c34-f428-5239-9e58fafac8fc
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCE08:16FF85:478474:5C243B:698FC41C
html-safe-nonce440e78be460a66bba33cff428ef6c85a972eec497bc2181cb69393a8a1924a2e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTA4OjE2RkY4NTo0Nzg0NzQ6NUMyNDNCOjY5OEZDNDFDIiwidmlzaXRvcl9pZCI6Ijg2NzI1MzM0OTc4NDIyMjIxMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac868b0c99571465cfd6bf31359e994514cc75bfb5b3e7e60f28f4274c4fb5edc2
hovercard-subject-tagpull_request:746495641
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/secureCodeBox/secureCodeBox/pull/687/files
twitter:imagehttps://avatars.githubusercontent.com/u/25148195?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/25148195?s=400&v=4
og:image:altCloses #683 Description This PR, if applied, adds default values to the cascading inherit fields. Using omitEmpty on booleans has an implicit default of omitting false values completely golang/go#1...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release111423ee085528bc9fa8c25b2e698c30347f841e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fpull%2F687%2Ffiles
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%2Fpull%2F687%2Ffiles
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%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=secureCodeBox%2FsecureCodeBox
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
Reloadhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
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
Sign up for GitHub https://github.com/signup?return_to=%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2Fnew%2Fchoose
J12934https://github.com/J12934
secureCodeBox:mainhttps://github.com/secureCodeBox/secureCodeBox/tree/main
Conversation 0 https://github.com/secureCodeBox/secureCodeBox/pull/687
Commits 1 https://github.com/secureCodeBox/secureCodeBox/pull/687/commits
Checks 0 https://github.com/secureCodeBox/secureCodeBox/pull/687/checks
Files changed https://github.com/secureCodeBox/secureCodeBox/pull/687/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
Add defaults for cascading inherit fields and disable omitEmpty https://github.com/secureCodeBox/secureCodeBox/pull/687/files#top
Show all changes 1 commit https://github.com/secureCodeBox/secureCodeBox/pull/687/files
7b3b8f6 Add defaults for cascading inherit fields and disable omitEmpty Sep 30, 2021 https://github.com/secureCodeBox/secureCodeBox/pull/687/commits/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5
Clear filters https://github.com/secureCodeBox/secureCodeBox/pull/687/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
Please reload this pagehttps://github.com/secureCodeBox/secureCodeBox/pull/687/files
scan_types.go https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-7bd70c1a539e53393c9a4f5001447889dffcad04de11abefb3676dc8808897c0
cascading.securecodebox.io_cascadingrules.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-cae954cc61d44a1aed469d52e06038d2d9603e77a7b8a5e2c4adede662c8975a
execution.securecodebox.io_scans.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-45034fed31dc57722a159d07d3e4e40b67370396468aaa7a03aa4bc42efdb950
execution.securecodebox.io_scheduledscans.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-c71483d8357da2397574455ba10512d6fce690dfc7634c220d697a7c52251a67
cascading.securecodebox.io_cascadingrules.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-b5b2c75480cbd4675fa2eaf691acfb404be84dd4fc30f9a206f469e7a9c2648c
execution.securecodebox.io_scans.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-8b8bc653ee4556f3834c4bc8f3da9a18257f073c1a248cd36dbffe1ddcdf09cc
execution.securecodebox.io_scheduledscans.yaml https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-27938938794a03cd18ad61acd19690d684101f8b41eb0690e9bc846dd06eabaf
operator/apis/execution/v1/scan_types.gohttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-7bd70c1a539e53393c9a4f5001447889dffcad04de11abefb3676dc8808897c0
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/apis/execution/v1/scan_types.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-7bd70c1a539e53393c9a4f5001447889dffcad04de11abefb3676dc8808897c0
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-7bd70c1a539e53393c9a4f5001447889dffcad04de11abefb3676dc8808897c0
operator/config/crd/bases/cascading.securecodebox.io_cascadingrules.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-cae954cc61d44a1aed469d52e06038d2d9603e77a7b8a5e2c4adede662c8975a
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/config/crd/bases/cascading.securecodebox.io_cascadingrules.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-cae954cc61d44a1aed469d52e06038d2d9603e77a7b8a5e2c4adede662c8975a
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-cae954cc61d44a1aed469d52e06038d2d9603e77a7b8a5e2c4adede662c8975a
operator/config/crd/bases/execution.securecodebox.io_scans.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-45034fed31dc57722a159d07d3e4e40b67370396468aaa7a03aa4bc42efdb950
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/config/crd/bases/execution.securecodebox.io_scans.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-45034fed31dc57722a159d07d3e4e40b67370396468aaa7a03aa4bc42efdb950
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-45034fed31dc57722a159d07d3e4e40b67370396468aaa7a03aa4bc42efdb950
operator/config/crd/bases/execution.securecodebox.io_scheduledscans.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-c71483d8357da2397574455ba10512d6fce690dfc7634c220d697a7c52251a67
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/config/crd/bases/execution.securecodebox.io_scheduledscans.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-c71483d8357da2397574455ba10512d6fce690dfc7634c220d697a7c52251a67
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-c71483d8357da2397574455ba10512d6fce690dfc7634c220d697a7c52251a67
operator/crds/cascading.securecodebox.io_cascadingrules.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-b5b2c75480cbd4675fa2eaf691acfb404be84dd4fc30f9a206f469e7a9c2648c
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/crds/cascading.securecodebox.io_cascadingrules.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-b5b2c75480cbd4675fa2eaf691acfb404be84dd4fc30f9a206f469e7a9c2648c
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-b5b2c75480cbd4675fa2eaf691acfb404be84dd4fc30f9a206f469e7a9c2648c
operator/crds/execution.securecodebox.io_scans.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-8b8bc653ee4556f3834c4bc8f3da9a18257f073c1a248cd36dbffe1ddcdf09cc
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/crds/execution.securecodebox.io_scans.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-8b8bc653ee4556f3834c4bc8f3da9a18257f073c1a248cd36dbffe1ddcdf09cc
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-8b8bc653ee4556f3834c4bc8f3da9a18257f073c1a248cd36dbffe1ddcdf09cc
operator/crds/execution.securecodebox.io_scheduledscans.yamlhttps://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-27938938794a03cd18ad61acd19690d684101f8b41eb0690e9bc846dd06eabaf
View file https://github.com/secureCodeBox/secureCodeBox/blob/7b3b8f6825077d82fb5b0eb75d2a515ddbfaf9a5/operator/crds/execution.securecodebox.io_scheduledscans.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/secureCodeBox/secureCodeBox/pull/687/{{ revealButtonHref }}
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-27938938794a03cd18ad61acd19690d684101f8b41eb0690e9bc846dd06eabaf
https://github.com/secureCodeBox/secureCodeBox/pull/687/files#diff-27938938794a03cd18ad61acd19690d684101f8b41eb0690e9bc846dd06eabaf
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.