Security hardening: CI permissions/pinning, webview/hover, policy#22
Merged
Conversation
CI workflow:
- Add top-level permissions: contents: read; package job still elevates
to contents: write for the release upload.
- Pin every action to a full commit SHA with a # v<n> trailing comment.
- Pin @vscode/vsce to 3.9.1 and ovsx to 0.10.12 so the publish step
holding VSCE_PAT no longer auto-installs latest at runtime.
Extension:
- escHtml also escapes single quotes.
- The <td>${p.index}</td> cell now goes through escHtml to match the
attribute usage on the same line.
- DocsViewProvider sets localResourceRoots: [] — the webview renders
only inline content and never needs filesystem access.
- Drop md.isTrusted from buildKeywordHover and buildParameterHover;
supportHtml stays where the inline span notices need it. isTrusted
would additionally permit command: link execution, which these
hovers never use.
New files:
- SECURITY.md — supported-versions statement and private vulnerability
reporting via GitHub Security Advisories.
- .github/dependabot.yml — weekly updates for npm (vscode-extension/),
pip (scripts/), and github-actions (/).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defense-in-depth hardening pass. No high-severity vulnerability was found; these changes close latent gaps and tighten the supply-chain posture.
CI workflow
permissions: contents: read. Thepackagejob still elevates tocontents: writefor the release upload.# v<n>trailing comment):actions/checkout,actions/setup-python,actions/setup-node,actions/upload-artifact,actions/download-artifactsoftprops/action-gh-release(third-party — highest-value pin)@vscode/vsce@3.9.1(build + publish) andovsx@0.10.12so the publish step holdingVSCE_PATno longer auto-installs latest at runtime.Extension (
vscode-extension/src/extension.ts)escHtmlalso escapes single quotes ('→') — closes a latent footgun if any future attribute is single-quoted.<td>${p.index}</td>cell now goes throughescHtmlto match the attribute usage on the same line.DocsViewProvidersetslocalResourceRoots: []. The webview renders only inline content and never needs filesystem access.md.isTrustedfrombuildKeywordHoverandbuildParameterHover.supportHtmlis kept where the inline<span>notices need it.isTrustedwould additionally permitcommand:link execution, which these hovers never use.New files
SECURITY.md— supported-versions statement and private vulnerability reporting via GitHub Security Advisories..github/dependabot.yml— weekly updates fornpm(vscode-extension/),pip(scripts/), andgithub-actions(/). Keeps the new SHA pins fresh.Verification
tsc -p ./— compiles clean.jest— 189/189 tests pass.