René's URL Explorer Experiment


Title: AutoDiscovery serviceaccount lacks permissions: User auto-discovery cannot delete resource "scheduledscans" in API group · Issue #2680 · secureCodeBox/secureCodeBox · GitHub

Open Graph Title: AutoDiscovery serviceaccount lacks permissions: User auto-discovery cannot delete resource "scheduledscans" in API group · Issue #2680 · secureCodeBox/secureCodeBox

X Title: AutoDiscovery serviceaccount lacks permissions: User auto-discovery cannot delete resource "scheduledscans" in API group · Issue #2680 · secureCodeBox/secureCodeBox

Description: 🐞 Bug report Describe the bug When a pod is deleted the scheduledscan related to it is not properly deleted. Steps To Reproduce kind create cluster --name xxx Install securecodebox operator helm --namespace securecodebox-system upgrade -...

Open Graph Description: 🐞 Bug report Describe the bug When a pod is deleted the scheduledscan related to it is not properly deleted. Steps To Reproduce kind create cluster --name xxx Install securecodebox operator helm --...

X Description: 🐞 Bug report Describe the bug When a pod is deleted the scheduledscan related to it is not properly deleted. Steps To Reproduce kind create cluster --name xxx Install securecodebox operator helm --...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"AutoDiscovery serviceaccount lacks permissions: User auto-discovery cannot delete resource \"scheduledscans\" in API group","articleBody":"## 🐞 Bug report\r\n\r\n### Describe the bug\r\nWhen a pod is deleted the scheduledscan related to it is not properly deleted.\r\n\r\n### Steps To Reproduce\r\n1. `kind create cluster --name xxx`\r\n2. Install securecodebox operator `helm --namespace securecodebox-system upgrade --install --create-namespace securecodebox-operator oci://ghcr.io/securecodebox/helm/operator`\r\n3. Install autodiscovery `helm install --namespace securecodebox-system auto-discovery-kubernetes oci://ghcr.io/securecodebox/helm/auto-discovery-kubernetes --values values.yaml`\r\n\r\nValues can be seen here\r\n```yaml\r\nconfig:\r\n  resourceInclusion:\r\n    mode: \"enabled-per-namespace\"\r\n  serviceAutoDiscovery:\r\n    enabled: false\r\n  containerAutoDiscovery:\r\n    enabled: true\r\n    scanConfigs:\r\n    - annotations:\r\n        defectdojo.securecodebox.io/engagement-name: \"{{ .Target.Name }}\"\r\n        defectdojo.securecodebox.io/engagement-version: \"{{if (index .Target.Labels\r\n          `app.kubernetes.io/version`) }}{{ index .Target.Labels `app.kubernetes.io/version`\r\n          }}{{end}}\"\r\n        defectdojo.securecodebox.io/product-name: \"{{ .Cluster.Name }} | {{ .Namespace.Name\r\n          }} | {{ .Target.Name }}\"\r\n        defectdojo.securecodebox.io/product-tags: cluster/{{ .Cluster.Name }},namespace/{{\r\n          .Namespace.Name }}\r\n      env: []\r\n      hookSelector: {}\r\n      labels: {}\r\n      name: trivy\r\n      parameters:\r\n      - \"{{ .ImageID }}\"\r\n      repeatInterval: 168h\r\n      scanType: trivy-sbom-image\r\n      volumeMounts: []\r\n      volumes: []\r\n```\r\n4. Create new ns `k create ns trivy-test`\r\n5. Install scanner in namespace `helm upgrade --namespace trivy-test --install trivy-sbom oci://ghcr.io/securecodebox/helm/trivy-sbom`\r\n6. Annotate namespace `k annotate ns trivy-test auto-discovery.securecodebox.io/enabled=true`\r\n7. Create pod `k run nginx --image nginx -n trivy-test`\r\n8. Delete pod `k delete pod/nginx -n trivy-test`\r\n\r\n### Expected behavior\r\nGarbage collection should be able to delete the scheduledscans, scans, etc. \r\n\r\n### System (please complete the following information):\r\n- secureCodeBox 4.7.0\r\n- OS: macOS 14.3.1\r\n- Kubernetes Version v1.30.2\r\n- Docker Version 25.0.3\r\n- Browser chrome\r\n\r\n### Screenshots / Logs\r\n\r\n```\r\nk logs pod/auto...\r\n\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:311\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:261\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:222\r\n2024-09-26T09:43:01Z\tERROR\tcontrollers.ContainerScanController\tUnable to delete scheduled scan\t{\"scan\": \"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\", \"error\": \"scheduledscans.execution.securecodebox.io \\\"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\\\" is forbidden: User \\\"system:serviceaccount:securecodebox-system:auto-discovery\\\" cannot delete resource \\\"scheduledscans\\\" in API group \\\"execution.securecodebox.io\\\" in the namespace \\\"app-ws-iris-workstation\\\"\"}\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).deleteScans\r\n\t/workspace/controllers/container_scan_controller.go:468\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).checkIfScansNeedToBeDeleted\r\n\t/workspace/controllers/container_scan_controller.go:407\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).Reconcile\r\n\t/workspace/controllers/container_scan_controller.go:84\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:114\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:311\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:261\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:222\r\n2024-09-26T09:43:01Z\tERROR\tcontrollers.ContainerScanController\tUnable to delete scheduled scan\t{\"scan\": \"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\", \"error\": \"scheduledscans.execution.securecodebox.io \\\"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\\\" is forbidden: User \\\"system:serviceaccount:securecodebox-system:auto-discovery\\\" cannot delete resource \\\"scheduledscans\\\" in API group \\\"execution.securecodebox.io\\\" in the namespace \\\"app-ws-iris-workstation\\\"\"}\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).deleteScans\r\n\t/workspace/controllers/container_scan_controller.go:468\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).checkIfScansNeedToBeDeleted\r\n\t/workspace/controllers/container_scan_controller.go:407\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).Reconcile\r\n\t/workspace/controllers/container_scan_controller.go:84\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:114\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:311\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:261\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:222\r\n2024-09-26T09:43:01Z\tERROR\tcontrollers.ContainerScanController\tUnable to delete scheduled scan\t{\"scan\": \"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\", \"error\": \"scheduledscans.execution.securecodebox.io \\\"nginx-trivy-at-04ba374043ccd2fc5c593885c0eacddebabd5ca375f9323\\\" is forbidden: User \\\"system:serviceaccount:securecodebox-system:auto-discovery\\\" cannot delete resource \\\"scheduledscans\\\" in API group \\\"execution.securecodebox.io\\\" in the namespace \\\"app-ws-iris-workstation\\\"\"}\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).deleteScans\r\n\t/workspace/controllers/container_scan_controller.go:468\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).checkIfScansNeedToBeDeleted\r\n\t/workspace/controllers/container_scan_controller.go:407\r\ngithub.com/secureCodeBox/secureCodeBox/auto-discovery/kubernetes/controllers.(*ContainerScanReconciler).Reconcile\r\n\t/workspace/controllers/container_scan_controller.go:84\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:114\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:311\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:261\r\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\r\n\t/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.18.2/pkg/internal/controller/controller.go:222\r\n\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/LittaKake","@type":"Person","name":"LittaKake"},"datePublished":"2024-09-26T10:41:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2680/secureCodeBox/issues/2680"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b0450d9d-0292-6262-6580-33c6dd69947a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9A22:18E686:45F7A17:602BC6F:6977FDF5
html-safe-noncec9b382ec6fc7264f951052ef81e22c6e39f8399fc56c683b947fe0dddf380e7b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTIyOjE4RTY4Njo0NUY3QTE3OjYwMkJDNkY6Njk3N0ZERjUiLCJ2aXNpdG9yX2lkIjoiODI5NjM2OTg1OTY0NjE5MzE0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac33e8ca103485a35569958dace30bae11e3bb1d2ea6131904940fb1be50d068c6
hovercard-subject-tagissue:2550208527
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/2680/issue_layout
twitter:imagehttps://opengraph.githubassets.com/91870faafc585b835b09f2537224227317f287057894d91997cbe530ac13315a/secureCodeBox/secureCodeBox/issues/2680
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/91870faafc585b835b09f2537224227317f287057894d91997cbe530ac13315a/secureCodeBox/secureCodeBox/issues/2680
og:image:alt🐞 Bug report Describe the bug When a pod is deleted the scheduledscan related to it is not properly deleted. Steps To Reproduce kind create cluster --name xxx Install securecodebox operator helm --...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLittaKake
hostnamegithub.com
expected-hostnamegithub.com
None9306bf4a8c8a88a5945f83e25033fc5e6fb7a05f40c5fca300ac67db7fee56ae
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
releasec586ac0f2edbf5b31f9ca03622220a4285e2def8
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/secureCodeBox/secureCodeBox/issues/2680#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FsecureCodeBox%2FsecureCodeBox%2Fissues%2F2680
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%2F2680
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/2680
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/2680
Reloadhttps://github.com/secureCodeBox/secureCodeBox/issues/2680
secureCodeBox https://github.com/secureCodeBox
secureCodeBoxhttps://github.com/secureCodeBox/secureCodeBox
Notifications https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Fork 176 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Star 948 https://github.com/login?return_to=%2FsecureCodeBox%2FsecureCodeBox
Code https://github.com/secureCodeBox/secureCodeBox
Issues 72 https://github.com/secureCodeBox/secureCodeBox/issues
Pull requests 3 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/2680
New issuehttps://github.com/login?return_to=https://github.com/secureCodeBox/secureCodeBox/issues/2680
AutoDiscovery serviceaccount lacks permissions: User auto-discovery cannot delete resource "scheduledscans" in API grouphttps://github.com/secureCodeBox/secureCodeBox/issues/2680#top
https://github.com/BorisShek
bugBugshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/LittaKake
https://github.com/LittaKake
LittaKakehttps://github.com/LittaKake
on Sep 26, 2024https://github.com/secureCodeBox/secureCodeBox/issues/2680#issue-2550208527
BorisShekhttps://github.com/BorisShek
bugBugshttps://github.com/secureCodeBox/secureCodeBox/issues?q=state%3Aopen%20label%3A%22bug%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.