Skip to content

๐Ÿ›ก๏ธ Sentinel: [HIGH] Gherkin ๋‚ด๋ณด๋‚ด๊ธฐ ๊ฒฝ๋กœ ํƒ์ƒ‰ ์ทจ์•ฝ์  ์ˆ˜์ •#43

Open
seonghobae wants to merge 1 commit into
mainfrom
sentinel/fix-path-traversal-16705097182536217132
Open

๐Ÿ›ก๏ธ Sentinel: [HIGH] Gherkin ๋‚ด๋ณด๋‚ด๊ธฐ ๊ฒฝ๋กœ ํƒ์ƒ‰ ์ทจ์•ฝ์  ์ˆ˜์ •#43
seonghobae wants to merge 1 commit into
mainfrom
sentinel/fix-path-traversal-16705097182536217132

Conversation

@seonghobae

Copy link
Copy Markdown

๐Ÿšจ Severity: HIGH
๐Ÿ’ก Vulnerability: vspec export gherkin ์‹คํ–‰ ์‹œ --output ์˜ต์…˜์— ../../ ๊ฐ™์€ ๊ฒฝ๋กœ ํƒ์ƒ‰ ๋ฌธ์ž์—ด์„ ์ž…๋ ฅํ•˜๋ฉด ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ์™ธ๋ถ€ ์ž„์˜์˜ ์œ„์น˜์— ํŒŒ์ผ์„ ์“ธ ์ˆ˜ ์žˆ๋Š” ์ทจ์•ฝ์ ์ด ๋ฐœ๊ฒฌ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
๐ŸŽฏ Impact: ์•…์˜์ ์ธ ํŒŒ์ผ ๋ฎ์–ด์“ฐ๊ธฐ๋‚˜ ํ”„๋กœ์ ํŠธ ์™ธ๋ถ€ ์˜์—ญ์˜ ํŒŒ์ผ ์ƒ์„ฑ์œผ๋กœ ์ธํ•ด ์‹œ์Šคํ…œ ์†์ƒ์ด ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ”ง Fix: path.resolve๋กœ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ๋งŒ๋“ค๊ณ  path.relative๋ฅผ ์‚ฌ์šฉํ•ด ๋Œ€์ƒ ๊ฒฝ๋กœ๊ฐ€ config.root ๋‚ด๋ถ€์— ์œ„์น˜ํ•˜๋Š”์ง€ ์—„๊ฒฉํžˆ ๊ฒ€์‚ฌํ•˜๋„๋ก src/export/gherkin.ts๋ฅผ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ๊ฒ€์‚ฌ์— ์‹คํŒจํ•˜๋ฉด VspecError("INVALID_ARGUMENT")๋ฅผ ๋ฐœ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค.
โœ… Verification: pnpm typecheck ๋ฐ pnpm test๊ฐ€ ๋ชจ๋‘ ์„ฑ๊ณตํ•˜๋ฉฐ, tests/gherkin.test.ts์— ์ด๋ฅผ ๋ฐฉ์–ดํ•˜๋Š” ์ „์šฉ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.


PR created automatically by Jules for task 16705097182536217132 started by @seonghobae

exportGherkin ๋ช…๋ น์—์„œ ์•…์˜์ ์ธ ๊ฒฝ๋กœ(์˜ˆ: ../../tmp/pwned.txt)๋ฅผ ํ†ตํ•ด
ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๋””๋ ‰ํ† ๋ฆฌ ์™ธ๋ถ€์˜ ํŒŒ์ผ ์‹œ์Šคํ…œ์— ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋Š”
๊ฒฝ๋กœ ํƒ์ƒ‰(Path Traversal) ์ทจ์•ฝ์ ์„ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
path.resolve์™€ path.relative๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ถœ๋ ฅ ๊ฒฝ๋กœ๊ฐ€
ํ•ญ์ƒ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๋‚ด๋ถ€์— ์œ„์น˜ํ•˜๋„๋ก ์ œํ•œํ•ฉ๋‹ˆ๋‹ค.
@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a ๐Ÿ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@greptile-apps greptile-apps 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.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed.

Review Change Stack

๐Ÿ“ Walkthrough

Summary by CodeRabbit

๋ฆด๋ฆฌ์Šค ๋…ธํŠธ

  • Bug Fixes

    • Gherkin export ๊ธฐ๋Šฅ์˜ ๋ณด์•ˆ ์ทจ์•ฝ์ ์„ ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค. ์ถœ๋ ฅ ๊ฒฝ๋กœ๊ฐ€ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ๋ฅผ ๋ฒ—์–ด๋‚˜๋Š” ๊ฒฝ์šฐ ์˜ค๋ฅ˜๋ฅผ ๋ฐœ์ƒ์‹œํ‚ค๋„๋ก ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • Tests

    • ๊ฒฝ๋กœ ๊ฒ€์ฆ ๋กœ์ง์ด ์ •์ƒ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธํ•˜๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • Documentation

    • ๊ฒฝ๋กœ ์กฐ์ž‘ ์ทจ์•ฝ์ ์— ๋Œ€ํ•œ ์„ค๋ช…๊ณผ ๋Œ€์‘ ๋ฐฉ์•ˆ์„ ๋ฌธ์„œํ™”ํ–ˆ์Šต๋‹ˆ๋‹ค.

์š”์•ฝ

Gherkin ๋‚ด๋ณด๋‚ด๊ธฐ์˜ --output ๊ฒฝ๋กœ ์ธ์ž๊ฐ€ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ๋ฅผ ๋ฒ—์–ด๋‚˜๋Š” ๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ๊ณต๊ฒฉ์— ์ทจ์•ฝํ–ˆ๋˜ ์ ์„ resolve/relative ๊ธฐ๋ฐ˜์˜ ๊ฒฝ๋กœ ๊ฒ€์ฆ์œผ๋กœ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค. ์ทจ์•ฝ์  ๋ฌธ์„œ, ๊ตฌํ˜„ ์ˆ˜์ •, ํ…Œ์ŠคํŠธ ์ปค๋ฒ„๋ฆฌ์ง€๊ฐ€ ํ•จ๊ป˜ ์ถ”๊ฐ€๋ฉ๋‹ˆ๋‹ค.

๋ณ€๊ฒฝ ์‚ฌํ•ญ

๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ์ทจ์•ฝ์  ์ˆ˜์ •

๊ณ„์ธต / ํŒŒ์ผ(๋“ค) ์š”์•ฝ
๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค ์ทจ์•ฝ์  ํ•ด๊ฒฐ
.jules/sentinel.md, src/export/gherkin.ts
exportGherkin์˜ --output ์ธ์ž๊ฐ€ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ๋ฅผ ๋ฒ—์–ด๋‚˜๋Š” ๊ฒฝ๋กœ ์กฐ์ž‘์„ ํ—ˆ์šฉํ–ˆ๋˜ ์ทจ์•ฝ์ ์„ ๋ฌธ์„œํ™”ํ•ฉ๋‹ˆ๋‹ค. resolve(config.root, output)์œผ๋กœ ์ ˆ๋Œ€ ๊ฒฝ๋กœ๋ฅผ ๊ตฌ์„ฑํ•œ ๋’ค relative(config.root, outputPath)๊ฐ€ ..๋กœ ์‹œ์ž‘ํ•˜๊ฑฐ๋‚˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ์ธ ๊ฒฝ์šฐ VspecError("INVALID_ARGUMENT", ...)๋ฅผ throwํ•˜์—ฌ ๋ฃจํŠธ ํƒˆ์ถœ์„ ์ฐจ๋‹จํ•ฉ๋‹ˆ๋‹ค. path ๋ชจ๋“ˆ์˜ relative, resolve, isAbsolute ํ•จ์ˆ˜๋ฅผ ์ถ”๊ฐ€๋กœ importํ•ฉ๋‹ˆ๋‹ค.
๊ฒฝ๋กœ ํƒˆ์ถœ ๊ฒ€์ฆ ํ…Œ์ŠคํŠธ
tests/gherkin.test.ts
์ž„์‹œ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ๋ฅผ ์„ค์ •ํ•˜์—ฌ exportGherkin์ด ์ƒ์œ„ ๊ฒฝ๋กœ ํŠธ๋ž˜๋ฒ„์„ค(..)์„ ์‹œ๋„ํ•  ๋•Œ "Export path escapes the project root." ์˜ค๋ฅ˜๋ฅผ ๋˜์ง€๋Š”์ง€ ๊ฒ€์ฆํ•˜๋Š” ํ…Œ์ŠคํŠธ๋ฅผ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. ํ…Œ์ŠคํŠธ ์ „ํ›„์— ์ž„์‹œ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์ƒ์„ฑ/์‚ญ์ œํ•˜๊ณ  ํ•„์š”ํ•œ ์œ ํ‹ธ์„ importํ•ฉ๋‹ˆ๋‹ค.

์˜ˆ์ƒ ์ฝ”๋“œ ๋ฆฌ๋ทฐ ๋‚œ์ด๋„

๐ŸŽฏ 3 (์ ์ •) | โฑ๏ธ ~20๋ถ„

์‹œ

์•…์˜๋กœ ์œ„๋ฅผ ํ–ฅํ•ด ๊ฐ€๋Š” ๊ฒฝ๋กœ๋ฅผ ๐Ÿฐ
์ ˆ๋Œ€ ๊ฒฝ๋กœ๋กœ ๊ตฌ์†ํ•˜๊ณ 
์ƒ๋Œ€๋ฅผ ์ธก์ •ํ•˜์—ฌ
๋ฃจํŠธ์—์„œ ํƒˆ์ฃผ ๋ง‰๊ฒ ๋„ค ๐Ÿ›ก๏ธ
์‹œํ์–ดํ•œ ๋‚ด๋ณด๋‚ด๊ธฐ, ์ด์ œ๋Š” ์•ˆ์ „ํ•ด! โœจ


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

โŒ Failed checks (1 error)

Check name Status Explanation Resolution
Docstring Coverage โŒ Error Docstring coverage is 0.00% which is insufficient. The required threshold is 100.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
โœ… Passed checks (4 passed)
Check name Status Explanation
Title check โœ… Passed PR ์ œ๋ชฉ์€ ๊ฒฝ๋กœ ํƒ์ƒ‰(path traversal) ์ทจ์•ฝ์  ์ˆ˜์ •์„ ๋ช…ํ™•ํ•˜๊ฒŒ ์„ค๋ช…ํ•˜๋ฉฐ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์˜ ํ•ต์‹ฌ์„ ์ •ํ™•ํžˆ ๋ฐ˜์˜ํ•ฉ๋‹ˆ๋‹ค.
Description check โœ… Passed PR ์„ค๋ช…์€ ์ทจ์•ฝ์ ์˜ ์‹ฌ๊ฐ๋„, ์˜ํ–ฅ, ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•, ๊ฒ€์ฆ ๋‚ด์šฉ์„ ์ƒ์„ธํžˆ ๊ธฐ์ˆ ํ•˜๋ฉฐ ๋ณ€๊ฒฝ ์‚ฌํ•ญ๊ณผ ์™„์ „ํžˆ ์ผ์น˜ํ•ฉ๋‹ˆ๋‹ค.
Linked Issues check โœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check โœ… Passed Check skipped because no linked issues were found for this pull request.
โœจ Finishing Touches
๐Ÿ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
๐Ÿงช Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel/fix-path-traversal-16705097182536217132
โœจ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch sentinel/fix-path-traversal-16705097182536217132

Warning

Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

๐Ÿค– Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/export/gherkin.ts`:
- Around line 43-51: The current path-check uses resolve/relative string checks
which can be bypassed via symlinks; update the export flow to compare real
paths: compute realRoot = realpathSync(config.root) and realTarget =
realpathSync(dirname(outputPath)) (or realpathSync(outputPath) if it exists) and
ensure realTarget.startsWith(realRoot) before calling mkdirSync or
writeFileSync; additionally, use lstatSync on each path component as needed to
detect unexpected symlinks and fail if a symlink would escape the root
(references: outputPath, rel, config.root, mkdirSync, writeFileSync).

In `@tests/gherkin.test.ts`:
- Around line 30-37: Update the test so it asserts the thrown error is a
VspecError and that error.code === "INVALID_ARGUMENT" in addition to the
message: import or reference the VspecError symbol, replace the single
expect(...).toThrowError(...) with a try/catch around exportGherkin({ ...
output: "...." }) that fails if no error is thrown, then in the catch assert
expect(err).toBeInstanceOf(VspecError),
expect(err.code).toBe("INVALID_ARGUMENT"), and still check the message (e.g.,
expect(err.message).toMatch(/Export path escapes/)) to fully validate the error
contract thrown by exportGherkin.
๐Ÿช„ Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

โ„น๏ธ Review info
โš™๏ธ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f1d9d1e1-ae32-447b-8459-7e95df4239ff

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between f4278ec and 242cfe2.

๐Ÿ“’ Files selected for processing (3)
  • .jules/sentinel.md
  • src/export/gherkin.ts
  • tests/gherkin.test.ts

Comment thread src/export/gherkin.ts
Comment on lines +43 to 51
const outputPath = resolve(config.root, output);

const rel = relative(config.root, outputPath);
if (rel.startsWith("..") || isAbsolute(rel)) {
throw new VspecError("INVALID_ARGUMENT", "Export path escapes the project root.");
}

mkdirSync(dirname(outputPath), { recursive: true });
writeFileSync(outputPath, text);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸ  Major

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

#!/bin/bash
# Verify current implementation is lexical-only (no canonical/symlink guard).
rg -n 'exportGherkin|resolve\(|relative\(|realpathSync|lstatSync|writeFileSync' src/export/gherkin.ts

Repository: Seongho-Bae/vooster-v2-mvp

Length of output: 371


๐Ÿ Script executed:

#!/bin/bash
sed -n '1,120p' src/export/gherkin.ts

Repository: Seongho-Bae/vooster-v2-mvp

Length of output: 2385


์‹ฌ๋ณผ๋ฆญ ๋งํฌ๋กœ ํ”„๋กœ์ ํŠธ ๋ฃจํŠธ ๊ฒฝ๊ณ„๋ฅผ ์šฐํšŒํ•ด ์“ฐ๊ธฐ๊ฐ€ ๊ฐ€๋Šฅํ•จ (src/export/gherkin.ts:43-51)

ํ˜„์žฌ ๊ฒ€์‚ฌ๋Š” resolve/relative๋กœ โ€œ๋ฌธ์ž์—ด ๊ฒฝ๊ณ„โ€๋งŒ ํ™•์ธํ•˜๊ณ , config.root/๋ถ€๋ชจ/๋Œ€์ƒ ๊ฒฝ๋กœ์˜ realpath ๋ฐ symlink ์—ฌ๋ถ€๋ฅผ ์ „ํ˜€ ๊ฒ€์ฆํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๋ฃจํŠธ ๋‚ด๋ถ€์— symlink์ด ํฌํ•จ๋˜๋ฉด mkdirSync(...)/writeFileSync(...)๊ฐ€ ์‹ค์ œ๋กœ ๋ฃจํŠธ ๋ฐ–์„ ๊ฐ€๋ฆฌํ‚ค๋Š” ๊ฒฝ๋กœ์— ํŒŒ์ผ์„ ๊ธฐ๋กํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ”’ ์ œ์•ˆ ์ˆ˜์ •์•ˆ
-import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
+import { existsSync, lstatSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
 import { dirname, join, relative, resolve, isAbsolute } from "node:path";
@@
-  const outputPath = resolve(config.root, output);
+  const rootReal = realpathSync(config.root);
+  const outputPath = resolve(rootReal, output);
 
-  const rel = relative(config.root, outputPath);
+  const rel = relative(rootReal, outputPath);
   if (rel.startsWith("..") || isAbsolute(rel)) {
     throw new VspecError("INVALID_ARGUMENT", "Export path escapes the project root.");
   }
 
   mkdirSync(dirname(outputPath), { recursive: true });
+  const parentReal = realpathSync(dirname(outputPath));
+  const parentRel = relative(rootReal, parentReal);
+  if (parentRel.startsWith("..") || isAbsolute(parentRel)) {
+    throw new VspecError("INVALID_ARGUMENT", "Export path escapes the project root.");
+  }
+  if (existsSync(outputPath) && lstatSync(outputPath).isSymbolicLink()) {
+    throw new VspecError("INVALID_ARGUMENT", "Export path escapes the project root.");
+  }
   writeFileSync(outputPath, text);
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/export/gherkin.ts` around lines 43 - 51, The current path-check uses
resolve/relative string checks which can be bypassed via symlinks; update the
export flow to compare real paths: compute realRoot = realpathSync(config.root)
and realTarget = realpathSync(dirname(outputPath)) (or realpathSync(outputPath)
if it exists) and ensure realTarget.startsWith(realRoot) before calling
mkdirSync or writeFileSync; additionally, use lstatSync on each path component
as needed to detect unexpected symlinks and fail if a symlink would escape the
root (references: outputPath, rel, config.root, mkdirSync, writeFileSync).

Comment thread tests/gherkin.test.ts
Comment on lines +30 to +37
it("rejects path traversal attempts that escape the project root", () => {
initProject({ root: tmpRoot, key: "TEST" });
createUseCase({ cwd: tmpRoot, title: "Test Path Traversal", primaryActor: "system" });

expect(() => {
exportGherkin({ cwd: tmpRoot, key: "TEST-001", output: "../../../../../../../../../../../../../../../../tmp/pwned.txt" });
}).toThrowError("Export path escapes the project root.");
});

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

โš ๏ธ Potential issue | ๐ŸŸก Minor

๐Ÿงฉ Analysis chain

๐Ÿ Script executed:

#!/bin/bash
# Verify whether tests assert error code/type contract in addition to message.
rg -n 'Export path escapes the project root|INVALID_ARGUMENT|VspecError|toThrowError' tests/gherkin.test.ts src/export/gherkin.ts

Repository: Seongho-Bae/vooster-v2-mvp

Length of output: 338


์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋ฟ ์•„๋‹ˆ๋ผ VspecError ์ฝ”๋“œ ๊ณ„์•ฝ๋„ ๋‹จ์–ธํ•˜๋„๋ก ํ…Œ์ŠคํŠธ๋ฅผ ๋ณด๊ฐ•ํ•˜์„ธ์š”.

  • src/export/gherkin.ts๋Š” ๊ฒฝ๋กœ ํƒˆ์ถœ ์‹œ new VspecError("INVALID_ARGUMENT", ...)๋ฅผ ๋˜์ง€๋Š”๋ฐ, tests/gherkin.test.ts๋Š” ํ˜„์žฌ ๋ฉ”์‹œ์ง€๋งŒ toThrowError๋กœ ๊ฒ€์ฆํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
  • error๊ฐ€ VspecError์ธ์ง€์™€ error.code === "INVALID_ARGUMENT"๊นŒ์ง€ ํ•จ๊ป˜ ํ™•์ธํ•˜๋„๋ก ๋ณ€๊ฒฝํ•ด ํšŒ๊ท€๋ฅผ ๋ง‰์•„์ฃผ์„ธ์š”.
๐Ÿค– Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/gherkin.test.ts` around lines 30 - 37, Update the test so it asserts
the thrown error is a VspecError and that error.code === "INVALID_ARGUMENT" in
addition to the message: import or reference the VspecError symbol, replace the
single expect(...).toThrowError(...) with a try/catch around exportGherkin({ ...
output: "...." }) that fails if no error is thrown, then in the catch assert
expect(err).toBeInstanceOf(VspecError),
expect(err.code).toBe("INVALID_ARGUMENT"), and still check the message (e.g.,
expect(err.message).toMatch(/Export path escapes/)) to fully validate the error
contract thrown by exportGherkin.

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