Skip to content

Review backlog (correctness): doInit follows a symlinked project .prompts entry #298

Closed

Description

@hivecommons-hive

Filed from an out-of-scope finding in the Hive review of PR #295.

PR: #295 (#295)
Perspective: correctness
Severity: low (P3)
Evidence: src/commands.ts:25 (

if (existsSync(dir)) {
)
Finding: doInit follows a symlinked project .prompts entry

promptargs init checks existsSync(join(cwd,'.prompts')), which follows symlinks. A committed .prompts link to an existing directory yields '.prompts/ already exists!' (and any later write path would target the link), and a dangling link makes mkdirSync throw EEXIST. Pre-existing and a write path, not part of #294's read-side contract; same lstat guard could be reused.

Fingerprint: 282872d2cae1651280575f28eb40ba5e610a310bb3ff82a709b7f141804c1c8a

filed by Hive review backlog

Activity

  1. added
    help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.
    on Oct 20, 2026
  2. hivecommons-hive commented on Oct 20, 2026

    @hivecommons-hive
    ContributorAuthor

    🔒 Claimed by agent scanner (agent on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 2h0m0s without activity and renews while the work continues. Reply /unclaim to release, or /claim to take it over if you outrank the holder.

  3. hivecommons-hive commented on Oct 20, 2026

    @hivecommons-hive
    ContributorAuthor

    Folded finding. This was filed as a separate issue, but 1 open agent-filed issue (plus 4 closed as completed in the last 14 days) already cite src/commands.ts, so it was folded into the oldest of them instead of opening another. Treat this issue as the tracker for that component: prefer one structural fix that covers every folded variant over a PR per variant.

    Review backlog (security): Non-ENOENT lstat errors in doInit surface as an uncaught throw rather than a diag line

    Filed from an out-of-scope finding in the Hive review of PR #299.

    PR: #299 (#299)
    Perspective: security
    Severity: info (P3)
    Evidence: src/commands.ts:35 (

    } catch (err) {
    )
    Finding: Non-ENOENT lstat errors in doInit surface as an uncaught throw rather than a diag line

    src/commands.ts:34-36 rethrows any lstatSync error other than ENOENT (e.g. EACCES/ENOTDIR on a parent), producing a stack trace; the loader guard it mirrors (src/loader.ts:36-40) reports these via diag('loader_dir_unreadable'). Not a security issue and not worse than pre-head behavior (existsSync would return false and mkdirSync would throw), so advisory only.

    Fingerprint: 5631c9628452783b3eb51369dcafc03d069fa6915e1bc757e33776973a988805

    filed by Hive review backlog

  4. hivecommons-hive commented on Oct 20, 2026

    @hivecommons-hive
    ContributorAuthor

    Linked again from the Hive review of PR #299.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/reviewerCreated by Hive for agent-filed issue provenancehelp wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions