Skip to content

fix(projects): take the LaunchDarkly API token as an argument, not from env - #244

Draft
davidbrackbill wants to merge 2 commits into
mainfrom
db/directory-credential-examples
Draft

davidbrackbill wants to merge 2 commits into
mainfrom
db/directory-credential-examples

Conversation

@davidbrackbill

@davidbrackbill davidbrackbill commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Why

Follow-up to #243: the directory still holds the latest version for "Uses a credential from the user's machine", which covers doc examples too.

Note

Left as is: CI/k8s secret-store examples, SDK-key app code, and the eval provider (#247).

Details

projects references take the API token as an argument; CLI, Terraform, Ansible, compose prompt. Onboarding stops running npx skills add.

Claude claude@anthropic.com

$\color{#2DA44E}\rule{19px}{12px}\color{#FB8F44}\rule{381px}{12px}$
$\color{#2DA44E}\rule{9px}{9px}$ Code 5  $\color{#FB8F44}\rule{9px}{9px}$ Comments & docs 99

104 lines changed · generated by churn using cloc

…om env

The directory's "Uses a credential from the user's machine" hold also
covers code examples that read a token from the environment and send it
to a server. The agentcontrol/projects references read
LAUNCHDARKLY_API_TOKEN from env in the Python, Node.js, and Go
ProjectManager, the admin CLI, and the Terraform/Ansible examples. Make
the token a required argument, prompt for it in the CLI, Terraform, and
Ansible examples, and bump Claude (1.0.6) and Cursor (1.0.7).

Claude <claude@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 891fe3a. Configure here.

### List Projects
```python
pm = ProjectManager()
pm = ProjectManager(api_token)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FastAPI still reads API token

Medium Severity

The FastAPI Settings class still loads launchdarkly_api_token from .env via pydantic BaseSettings, so ProjectManager keeps reading a LaunchDarkly API token from the environment. The same file's Django example no longer does this, and the new header forbids reading the token from env or .env files. Agents that follow this section will keep using a machine credential.

Fix in Cursor Fix in Web

Triggered by learned rule: Plugin skills must not read machine credentials

Reviewed by Cursor Bugbot for commit 891fe3a. Configure here.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Skill eval results

Skill Before After Δ
agentcontrol/configs-create 100/100 (4/4) 75/100 (3/4) -25
agentcontrol/configs-update 80/100 (4/5) 80/100 (4/5) no change
agentcontrol/configs-variations 80/100 (4/5) 80/100 (4/5) no change
agentcontrol/tools 75/100 (3/4) 75/100 (3/4) no change
aws-devops-agent/experiment-orchestration - 100/100 (9/9) new
experiments/launchdarkly-experiment-guide - 100/100 (5/5) new
experiments/launchdarkly-experiment-hypothesis-builder - 100/100 (13/13) new
experiments/launchdarkly-experiment-setup - 100/100 (8/8) new
feature-flags/flag-and-release-change - 100/100 (4/4) new
feature-flags/flag-release - 80/100 (4/5) new
feature-flags/launchdarkly-flag-command - 100/100 (3/3) new
feature-flags/launchdarkly-flag-create 100/100 (3/3) 100/100 (4/4) no change
feature-flags/launchdarkly-flag-drift - 100/100 (4/4) new
feature-flags/should-flag-change - 100/100 (17/17) new
onboarding - 100/100 (7/7) new
release-autopilot/launchdarkly-release-autopilot-onboarding - 96/100 (24/25) new

Only suites whose source actually changed since their last recorded score were re-run. Soft-failing while we stabilise the baseline.

- iac-automation: the docker-compose setup prompts for the token instead
  of passing LAUNCHDARKLY_API_TOKEN through from the host shell; the CI
  examples say they read it from the platform's secret store.
- onboarding 0.4.1: read the bundled mcp-configure and sdk-install skills
  from its own folder instead of having the agent run `npx skills add`.

Claude <claude@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant