-
Notifications
You must be signed in to change notification settings - Fork 1
Tests #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Secrets | View in Orca |
424ad41 to
ef10e2f
Compare
42b567c to
bfb9b4f
Compare
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| - uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 10 | ||
| - run: pnpm install | ||
| - run: pnpm lint | ||
| - run: pnpm format | ||
| - run: pnpm build | ||
| - run: pnpm test |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the error, set the permissions key to restrict the GITHUB_TOKEN to the minimum required privilege. In this case, all workflow steps are read-only operations (checkout, install, lint, format, build, test), so only contents: read is needed. This can be set at the workflow level (top-level, applying to all jobs) or at the job level (under jobs.test). The best and simplest fix is to add a top-level permissions: block with contents: read directly below the workflow name (or at the top, before on: if no name is present), ensuring all jobs inherit this restriction.
Changes needed:
- Insert
permissions:\n contents: readafter line 1 (directly after or beforeon:; both are valid, but afteron:is most conventional if no workflownameexists). - No other changes or imports are needed.
-
Copy modified lines R7-R9
| @@ -4,6 +4,9 @@ | ||
| - main | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest |
danmichaeljones
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! We should remember to add a ticket for some additional tests too (e.g., the streaming) 👍
npmbadge to readme