Skip to content

Commit 9295041

Browse files
committed
fix(deps): resolve remaining Trivy dependency findings
2 parents 124bd0c + d02576b commit 9295041

58 files changed

Lines changed: 1299 additions & 927 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/checks.yml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ jobs:
3535
- name: Typecheck
3636
run: npm run typecheck
3737

38-
- name: Lint
39-
run: npm run lint
38+
- parallel:
39+
- name: Lint
40+
run: npm run lint
4041

41-
- name: Test
42-
run: npm run test
42+
- name: Test
43+
run: npm run test
4344

4445
- name: Build
4546
run: npm run build

‎.github/workflows/install-smoke.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Real install smoke: installs the CLI through the PRODUCTION installer at
2-
# polylane.com/install, pinned to a given release, in a throwaway HOME.
2+
# polylane.com/setup, pinned to a given release, in a throwaway HOME.
33
#
44
# Why this exists: the GitHub release's asset list is a contract with the
55
# installer. Shipping checksums.txt in v0.2.20 broke every curl install for
@@ -55,7 +55,7 @@ jobs:
5555
node-version: 20.x
5656

5757
- name: Fetch the production installer
58-
run: curl -fsSL --retry 3 --connect-timeout 10 -m 60 https://polylane.com/install -o /tmp/install.sh
58+
run: curl -fsSL --retry 3 --connect-timeout 10 -m 60 https://polylane.com/setup -o /tmp/install.sh
5959

6060
# Fresh HOME, no PATH or shell-config mutation, no telemetry, agent
6161
# wiring skipped. A piped run is EXPECTED to exit non-zero at the

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
release-artifacts/checksums.txt
112112
113113
# Real install of the just-published release through the production
114-
# installer (polylane.com/install), API-digest and checksums.txt legs both.
114+
# installer (polylane.com/setup), API-digest and checksums.txt legs both.
115115
# Catches a release that breaks the installer contract within minutes of
116116
# publishing instead of at polylanedotcom's daily install-bytes cron — the
117117
# class of failure that took installs down for 15 minutes on v0.2.20 (RCA:

‎AGENTS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ also carries the LGTM verdict contract the auto-approve workflow depends on.
2727
- JSON when piped, text in TTY; `--output` always overrides.
2828
- Every error ends with the exact command that fixes it.
2929
- The full API surface lives under `polylane api call <operationId>` as an escape hatch — wrap an op only when it earns a first-class command.
30-
- **The install script is a thin shim over this CLI.** `curl polylane.com/install | sh` (polylanedotcom `src/assets/install.sh`) only bootstraps: download, PATH, sign-in prompts, then `polylane setup`. Everything that knows about coding agents — detection, config paths, ids — lives in `src/agents/registry.ts` and is exposed for the installer to *call* (`polylane setup --list-detected --ids skills-sh` hands skills.sh its agent list; the polylane→skills.sh id table is `SKILLS_SH_IDS` here), never re-implemented in shell — not even an id map. When installer work needs new agent knowledge, add the flag or command here first.
30+
- **The install script is a thin shim over this CLI.** `curl polylane.com/setup | sh` (polylanedotcom `src/assets/setup.sh`) only bootstraps: download, PATH, sign-in prompts, then `polylane setup`. Everything that knows about coding agents — detection, config paths, ids — lives in `src/agents/registry.ts` and is exposed for the installer to *call* (`polylane setup --list-detected --ids skills-sh` hands skills.sh its agent list; the polylane→skills.sh id table is `SKILLS_SH_IDS` here), never re-implemented in shell — not even an id map. When installer work needs new agent knowledge, add the flag or command here first.
3131

3232
## Commands (build, lint, test)
3333

‎ERRORS.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Hint: polylane workspace use <id>
123123

124124
These are the non-obvious command-level behaviours an agent should know about. Specific error strings are subject to change — use these as categories you can rely on.
125125

126-
### Destructive operations (`auth logout`, `integration disconnect`, `cloud disconnect`, `memory delete`, …)
126+
### Destructive operations (`auth logout`, `integration disconnect`, `cloud disconnect`, …)
127127

128128
- Prompt for confirmation in interactive mode.
129129
- Require `--yes` in non-interactive mode, else exit `2`.

‎README.md‎

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# polylane
22

33
<p><strong>Agent-focused CLI for the <a href="https://polylane.com">Polylane</a> platform.</strong><br>
4-
Investigate production issues, explore cloud infrastructure, search code, and drive threads — from any agent or terminal.</p>
4+
Investigate production issues, explore cloud infrastructure, find the repositories behind a service, and drive threads — from any agent or terminal.</p>
55

66
<p>Your coding agent writes the code. It can't see production. Polylane is the missing sense.</p>
77

@@ -35,10 +35,10 @@ Pick whichever channel fits your system. All install the same Node-based bundle
3535

3636
```bash
3737
# macOS / Linux — curl
38-
curl -fsSL https://polylane.com/install.sh | bash
38+
curl -fsSL https://polylane.com/setup.sh | bash
3939

4040
# Windows — PowerShell
41-
irm https://polylane.com/install.ps1 | iex
41+
irm https://polylane.com/setup.ps1 | iex
4242

4343
# Homebrew (tap: coreplanelabs/tap)
4444
brew install coreplanelabs/tap/polylane
@@ -55,10 +55,27 @@ bun add -g @coreplane/polylane
5555
Version-pin the curl / PowerShell installers with:
5656

5757
```bash
58-
POLYLANE_VERSION=v0.1.0 curl -fsSL https://polylane.com/install.sh | bash
59-
$env:POLYLANE_VERSION='v0.1.0'; irm https://polylane.com/install.ps1 | iex
58+
POLYLANE_VERSION=v0.1.0 curl -fsSL https://polylane.com/setup.sh | bash
59+
$env:POLYLANE_VERSION='v0.1.0'; irm https://polylane.com/setup.ps1 | iex
6060
```
6161

62+
The CLI checks for updates after successful commands, at most once per day,
63+
and updates the active install without a prompt. npm, Bun, and Homebrew installs
64+
use their own package manager. Standalone installs verify the release checksum
65+
and version before replacing the bundle. The current command finishes on its
66+
original version; the next command uses the update. Progress goes to stderr.
67+
68+
Automatic updates require CLI `0.2.50` or later. Upgrade earlier versions once
69+
with the package manager or installer that owns your current install.
70+
71+
Run `polylane update` to update now, or `polylane update --dry-run` to inspect
72+
the detected install and available update. Set `POLYLANE_NO_AUTO_UPDATE=1` to
73+
disable automatic updates. Keep `POLYLANE_VERSION` set when running the CLI to
74+
retain a version pin. Homebrew pins are also respected. CI, development,
75+
prerelease, and unrecognized installs do not update automatically. An automatic
76+
update failure does not change the command's result; `polylane update` reports
77+
update errors and exits nonzero.
78+
6279
### Wire it into your coding agents
6380

6481
```bash
@@ -113,7 +130,7 @@ polylane issue note <issue-id> "rolled back deploy"
113130
polylane service logs <service> --since 1h --grep error
114131
polylane tools run findNodes --params '{"query":"api"}'
115132
polylane thread ask "<prompt>"
116-
polylane memory save "<finding>"
133+
polylane memory list # what the agent has learned (git-backed)
117134
```
118135

119136
## Discovering commands

‎build.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ async function main(): Promise<void> {
3636
'POLYLANE_ONBOARDING_RUN',
3737
'POLYLANE_TELEMETRY_NOTICE_ACK',
3838
'POLYLANE_TERMS_NOTICE_ACK',
39+
'POLYLANE_NO_AUTO_UPDATE',
40+
'POLYLANE_VERSION',
3941
]);
4042
// Bake every other POLYLANE_* env var visible at build time into the bundle, so
4143
// the produced binary works without needing those vars set at runtime.

‎codegen/parse-spec.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@ import { schemaToTypescript, type TypeGenOptions } from './type-utils';
1010

1111
const CLIENT_OPTS: TypeGenOptions = { refPrefix: 'T.' };
1212

13-
// The automations and scan reports features are retired; drop their endpoints
13+
// The automations feature is retired; drop its endpoints
1414
// and schemas from the generated client even while the API still serves them.
15-
const EXCLUDED_PATH = /\/(automations|scan_reports)(\/|$)/;
15+
const EXCLUDED_PATH = /\/automations(\/|$)/;
1616
const EXCLUDED_SCHEMAS = new Set([
1717
'Automation',
1818
'AutomationExecution',
1919
'AutomationNotification',
2020
'AutomationActionExecution',
2121
'TriggerAutomationBody',
2222
'CreateAutomationFromTemplateBody',
23-
'Scan Report',
2423
]);
2524

2625
export function parseSpec(spec: OpenAPISpec): ParsedSpec {

‎features/README.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Verification paths
2+
3+
- [OAuth login](oauth-login.md): browser consent, Google sign-in, and device authorization.

‎features/oauth-login.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# OAuth login
2+
3+
## User outcome
4+
5+
A user signs in, approves the registered CLI permissions, and receives an OAuth
6+
grant. Google sign-in carries the same consent request through the provider
7+
redirect. Retired scopes are absent from both browser and device requests.
8+
9+
## Entry points and prerequisites
10+
11+
`polylane auth login` uses browser consent. `polylane auth login --no-browser`
12+
uses device authorization. The interactive login offers Google sign-in.
13+
Use a released binary with its registered OAuth client, or a local build with
14+
`POLYLANE_OAUTH_CLIENT_ID` and `POLYLANE_OAUTH_CLIENT_SECRET` from the target
15+
environment's secret store. The user needs a verified account and workspace
16+
membership. Use a test account and a separate operating-system user for manual
17+
checks: the CLI stores credentials under that user's `~/.polylane` directory.
18+
19+
## Local checks
20+
21+
From the CLI repository, run `npm ci`, `npm run typecheck`, `npm run lint`,
22+
`npm run test`, and `npm run build`. Typecheck regenerates the live API types.
23+
The default scope list must satisfy `OAuthClient.scopes`; a retired scope
24+
must cause a type error.
25+
26+
`test/onboarding-run.test.ts` checks the Google redirect without a browser or
27+
network request. It requires that the nested consent URL omit all three
28+
`datasets:*` scopes. `test/oauth-client.test.ts` preserves the issue, agent
29+
tool, and page permissions. The type error and Google regression both fail
30+
when the retired dataset scopes are restored.
31+
32+
## Manual sign-in
33+
34+
Check `polylane --version` and `polylane auth status` before using the released
35+
build. Start browser login under the test operating-system user, select Google, finish
36+
sign-in, and approve consent. Expect the CLI to finish sign-in without
37+
`Invalid scopes requested`. Confirm `polylane auth status` and
38+
`polylane workspace list`. Repeat with `--no-browser` to check device consent.
39+
Confirm the grant's scopes stay within the registered client allowlist.
40+
41+
Use an account you own. Keep credentials out of proof logs and run
42+
`polylane auth logout` after the check. This attempts access-token revocation
43+
and removes local credentials; it does not revoke the refresh token.
44+
45+
## Boundaries and proof status
46+
47+
The server rejects a scope outside the registered client allowlist. Keep that
48+
refusal; removing a product permission does not permit restoring it for login.
49+
The offline checks prove request construction and the generated API contract.
50+
They do not prove Google acceptance, the token exchange, or a customer login.
51+
Live browser and device sign-in on a released build remain a manual check.
52+
Record the tested revision, build, environment, result, and sanitized evidence
53+
in the pull request before claiming that user outcome passed.
54+
55+
## Source anchors
56+
57+
- `src/auth/oauth.ts`: requested scopes, browser URLs, and device requests.
58+
- `src/commands/auth/login.ts`: login entry point and coordination.
59+
- `src/auth/credentials.ts`: credential persistence.
60+
- `src/generated/types.ts`: generated OAuth client scope contract.

0 commit comments

Comments
 (0)