Use CF_USERNAME/CF_PASSWORD env vars via .env file instead of positional args#7
Open
Use CF_USERNAME/CF_PASSWORD env vars via .env file instead of positional args#7
Conversation
…nal args Replace 'cf auth <USERNAME> <PASSWORD>' with the .env file pattern: store CF_USERNAME and CF_PASSWORD in a .env file, then 'source .env' before running 'cf auth'. This avoids credentials appearing in shell history or process listings. Also update the CircleCI example in cicd.instructions.md to use 'cf auth' (which reads CF_USERNAME/CF_PASSWORD from the environment) instead of passing credentials as flags to 'cf login'. Add a security note callout explaining the rationale. Incorporates feedback from @mogul on using a .env file rather than export statements. Closes #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #6 — replaces
cf auth <USERNAME> <PASSWORD>with the.envfile pattern.Changes
.github/copilot-instructions.md: Updated the Authentication section to show credentials stored in a.envfile and loaded viasource .envbefore runningcf auth. Added a security note callout explaining why positional args should be avoided..github/instructions/cicd.instructions.md: Updated the CircleCI example to usecf api+cf auth+cf target(which readsCF_USERNAME/CF_PASSWORDfrom the environment) instead of passing credentials as-u/-pflags tocf login.Rationale
.envfile approach per @mogul's feedback — agents can create files natively, andsource .envdoesn't leak values in shell historycf authnatively reads these env vars)@mogul — want to take a look at these changes?