René's URL Explorer Experiment


Title: Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder · GitHub

Open Graph Title: Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder

X Title: Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder

Description: Secure environments for developers and their agents - Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder

Open Graph Description: Secure environments for developers and their agents - Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder

X Description: Secure environments for developers and their agents - Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder

Opengraph URL: https://github.com/coder/coder

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled","articleBody":"The per-owner limits for user secrets and the per-build limits for workspace secrets are enforced by Postgres triggers that add up `octet_length(value)`. When dbcrypt is enabled, `value` holds base64 ciphertext (nonce + plaintext + GCM tag). That is about `4/3 * (plaintext + 28)` bytes, so a stored value is roughly a third larger than its plaintext.\n\nAs a result:\n\n- **The effective limit depends on whether encryption is on.** With encryption, the 24 KiB env cap fits only about 18 KiB of plaintext, and the 200 KiB total cap fits about 150 KiB. `codersdk/usersecretvalidation.go` documents this as acceptable because stored bytes are an upper bound on what gets transmitted.\n- **Turning on encryption can break rows that already exist.** A value that fit as plaintext may go over the limit once it is encrypted:\n  - **User secrets** (`trigger_user_secrets_per_user_limits`, `000509_user_secrets_limits.up.sql`): the trigger runs `BEFORE INSERT OR UPDATE`. When `coder server dbcrypt rotate` encrypts a user's secrets that are close to the cap, the UPDATE can fail with `user has reached the user secrets ... limit`.\n  - **Workspace secrets** (`trigger_workspace_secrets_per_build_limits`, `000613_workspace_secrets.up.sql`, #30248): the trigger runs only on `BEFORE INSERT`, so rotate succeeds. The next build then copies the previous build's secrets forward (`persistSecrets` in `coderd/wsbuilder/wsbuilder.go`, #30250), the INSERT goes over the limit, and the build fails with a 400. Ordinary start, stop, autostart and autostop builds that don't change any secret fail too. Autostop has no user to see the 400. The only recovery is to remove a secret by name on a build.\n\nWorkspace secrets intentionally follow the user secrets model for now. This issue tracks fixing both together.\n\n## Possible approaches\n\n1. **Check plaintext size in Go.** Compute sizes from plaintext before dbcrypt encrypts the value. Keep the count check, and possibly a looser byte check, in the trigger as a backstop. For workspace secrets this is race-free, because one transaction writes all of a build's secrets. User secrets are written by concurrent API calls, so they would still need DB-side enforcement for the aggregate limits.\n2. **Store the plaintext length in a column**, such as `value_bytes`. Triggers add up that column instead of `octet_length(value)`, and dbcrypt keeps it unchanged. The DB stays the source of truth, and the limits behave the same with or without encryption.\n3. **Keep measuring stored bytes but make migrations safe.** For example, rotate checks or reports rows that would go over the limit, and workspace secret copy-forward does not re-enforce limits on values that are carried over unchanged.\n\n## Acceptance\n\n- The same plaintext secrets fit within the limits whether or not dbcrypt is enabled, or the difference is a documented and deliberate choice.\n- Enabling encryption or running `dbcrypt rotate` on near-cap data does not fail, and later workspace builds that copy those secrets forward do not fail either.\n- Regression tests for both tables: seed near-cap plaintext, enable encryption or run rotate, then update a user secret and run a workspace build.\n\nRaised in review: https://github.com/coder/coder/pull/30249#discussion_r4199073495\n\n---\n\nGenerated by Coder Agents on behalf of @Emyrk.\n\n","author":{"url":"https://github.com/Emyrk","@type":"Person","name":"Emyrk"},"datePublished":"2026-10-06T20:11:40Z","url":"https://github.com/coder/coder/issues/30441"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:7ec2e673-25d5-5d85-9635-f8e395635e10
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idABA2:1AE20C:1E76517:268BABA:6B015F0D
html-safe-noncefd8d28310506ff8e59343f5a7a69de3cf28b0af14802ae0aa4f49ccc14e812c1
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkEyOjFBRTIwQzoxRTc2NTE3OjI2OEJBQkE6NkIwMTVGMEQiLCJ2aXNpdG9yX2lkIjoiNjQyNzk3OTg1NjY1MDI2NDMzMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7cb0c3b3a4cb1c49cca2800442a035ee468d97357610f27e53a08db94a77780
hovercard-subject-tagrepository:440752086
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/coder/issues/30441
twitter:imagehttps://repository-images.githubusercontent.com/440752086/eb56ccad-14f2-4c61-a024-20d1e77296c1
twitter:cardsummary_large_image
og:imagehttps://repository-images.githubusercontent.com/440752086/eb56ccad-14f2-4c61-a024-20d1e77296c1
og:image:altSecure environments for developers and their agents - Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabled · Issue #30441 · coder/coder
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-cache
go-importgithub.com/coder/coder git https://github.com/coder/coder.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id440752086
octolytics-dimension-repository_nwocoder/coder
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id440752086
octolytics-dimension-repository_network_root_nwocoder/coder
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/coder/coder/issues/30441#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F30441
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcoder%2Fissues%2F30441
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=coder%2Fcoder
Reloadhttps://github.com/coder/coder/issues/30441
Reloadhttps://github.com/coder/coder/issues/30441
Reloadhttps://github.com/coder/coder/issues/30441
https://github.com/coder/coder
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/30441
New issuehttps://github.com/login?return_to=https://github.com/coder/coder/issues/30441
Secret byte limits measure ciphertext, which breaks near-cap secrets when dbcrypt is enabledhttps://github.com/coder/coder/issues/30441#top
https://github.com/Emyrk
Emyrkhttps://github.com/Emyrk
on Oct 6, 2026https://github.com/coder/coder/issues/30441#issue-5734761956
feat: add workspace secrets table, queries, and RBAC #30248https://github.com/coder/coder/pull/30248
feat: set workspace secrets on workspace builds #30250https://github.com/coder/coder/pull/30250
#30249 (comment)https://github.com/coder/coder/pull/30249#discussion_r4199073495
@Emyrkhttps://github.com/Emyrk
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
on Oct 6, 2026https://github.com/coder/coder/issues/30441#issuecomment-6024572208
Linear Codehttps://linear.app
ENG-3452https://linear.app/codercom/issue/ENG-3452
Emyrkhttps://github.com/Emyrk
on Oct 15, 2026https://github.com/coder/coder/issues/30441#event-33368040140
feat(enterprise/dbcrypt): encrypt workspace secrets (#30249)https://github.com/coder/coder/commit/58a71f6238fdb18d7c3ec883bf28b7d2a3eecddc
#30249https://github.com/coder/coder/pull/30249
58a71f6https://github.com/coder/coder/commit/58a71f6238fdb18d7c3ec883bf28b7d2a3eecddc
Sign up for freehttps://github.com/signup?return_to=https://github.com/coder/coder/issues/30441
Sign in to commenthttps://github.com/login?return_to=https://github.com/coder/coder/issues/30441
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.