Repository navigation
Read the Release Env File Through the Carried Secret Readers - #561
Conversation
Carry the hub's lib/sh to lib/fleet/sh now that Blog declares the host-secrets type. make-release.sh checks its env file with require_secret and reads DEPLOY_ROOT, DEPLOY_SSH_HOST and SITE_BASE_URL with read_env_value, replacing the existence check and set -a sourcing. A group-readable or CRLF file is refused, and the file's other credentials no longer enter the script's environment. The carried copy keeps the hub's four-space indent, so .editorconfig scopes the tab rule away from lib/fleet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The docs still said make-release.sh sources its env file with set -a. They now say it reads three values and overwrites the caller's, set or not. Each copy step says to make the file mode 600, since the script refuses a group-readable one. The shell lint tasks list the carried library, matching CI's file set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
A recorded local strict-review pass covers head |
There was a problem hiding this comment.
🟡 Changes recommended
Several active documentation findings remain across the repository, including grammatically incomplete permission-related sentences that should be corrected for clarity.
5 open issues
What changed in this PR
This pull request moves release environment handling from sourcing the entire file to using the carried secret readers, adds stricter file validation, and updates related documentation and tooling.
Changes:
- Carries
lib/fleet/sh/secrets.shand reads only the required release values. - Validates private, LF-only environment files and documents the new behavior.
- Updates shell linting, formatting configuration, and environment-file examples.
- Review notes include documentation wording nits and a moderate issue involving
env_read_nameassignment in the carried helper.
| File | Summary |
|---|---|
README.md |
Documents environment-file permissions; one grammar nit remains. |
OPERATIONS.md |
Updates release procedures and value-reading behavior; includes grammar and “sourced” terminology nits. |
lib/fleet/sh/secrets.sh |
Carries the secret readers; has a moderate issue where env_read_name can be overridden by the sourced file. |
ENVIRONMENT.md |
Documents validation and selective environment-value reads. |
deploy/README.md |
Updates environment setup and permissions; one grammar nit remains. |
deploy/make-release.sh |
Uses require_secret and read_env_value instead of sourcing the environment file. |
.vscode/tasks.json |
Includes the carried library in shell lint tasks. |
.secrets/README.md |
Documents secure environment-file setup; one grammar nit remains. |
.secrets/example.env |
Updates environment-file usage notes; wording and scope nits remain. |
.editorconfig |
Applies four-space indentation to the carried shell tree. |
Review effort: Lite
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #561 +/- ##
==========================================
Coverage ? 53.98%
==========================================
Files ? 12
Lines ? 3412
Branches ? 0
==========================================
Hits ? 1842
Misses ? 1570
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|

Summary
Work items 2 and 3 of #553. The hub registry now declares
host-secretsfor this repository, so this change carries the hub'slib/shand movesdeploy/make-release.shonto it.lib/fleet/sh/secrets.shis a byte-for-byte copy of the hub'slib/sh, made with hubmain'sscripts/carry.py apply.carry.py checkreads the copy as current.deploy/make-release.sh. The script checks its env file withrequire_secret, then readsDEPLOY_ROOT,DEPLOY_SSH_HOST, andSITE_BASE_URLwithread_env_value. This replaces the[ -f ]check and theset -asourcing. The default file stays optional when it is absent, since CI reads no file.ENVIRONMENT.md,OPERATIONS.md,deploy/README.md,README.md,.secrets/README.md, and.secrets/example.envnow describe the reading the script does. Each copy step says to make the file mode 600..editorconfig. A section scoped tolib/fleet/**.shkeeps the carried copy at the hub's four-space indent, soshfmt -dagrees with it while this repository's own scripts keep tabs..vscode/tasks.json. The shell lint tasks list the carried file, matching CI's file set, soshellcheckfollows thesource=directive.Behavior Changes
[ -f ].Verification
HOME, withhugooffPATHso no build ran: a good default file, a remote file that trips theDEPLOY_SSH_HOSTguard, a leftover exportedDEPLOY_SSH_HOSTreplaced by the local file, an absent named file, a CRLF file, a mode 644 file, an absent default with no root, and an absent default with a root argument. Each answered as intended.shellcheckover the three tracked scripts is clean with-e SC2317, the local 0.10 false positive.shfmt -dis clean.python3 -m unittest discover -s checks/testspassed 203 tests.checks/env_docs_gate.pyis clean.--allow-comments: clean. Without it, thecomment-addedfindings are the carried file and the edited comments, so this pull request carries thecommentslabel.develop. The first raised 6 findings and the second raised 5, all fixed. The third raised none. The fourth covered the fix for Copilot's missing relative pronoun and raised none.Dropped findings
ENVIRONMENT.md:13,OPERATIONS.md:42,OPERATIONS.md:70,OPERATIONS.md:500: opt-insentence-lengthflags older sentences that sit on lines this change edited. This change did not write them. Class:style.lib/fleet/sh/secrets.sh: opt-insentence-lengthflags in the carried copy. The copy is byte-locked to the hub. Class:pre-existing, hub-side.🤖 Generated with Claude Code