Repository navigation
fix(scripts): force HTTPS on the MCP registry curl downloads and commit the sysml-mcp lockfile - #1329
Merged
Merged
Conversation
Sonar shell:S6506 flags both curl invocations: with -L and no protocol restriction a redirect could leave https. --proto '=https' refuses any other scheme on the first request and on redirects, --tlsv1.2 refuses older TLS; the fail, silent, retry and output flags are unchanged. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ep with its manifest Sonar text:S8564 reports packaging/npm/sysml-mcp/package.json without a lock file. The lockfile is generated with npm 11.21.0 (the version the nightly publish job pins); the runner's five platform packages are optional and not yet on npm, so it carries the root entry only, as client/node's does before a release. TestMCPRunnerLockfileAgreesWithTheManifest fails when a version bump leaves it behind, and the release procedure now regenerates both lockfiles. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
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.
What and why
develop's SonarCloud quality gate is ERROR onnew_security_rating = 3(threshold 1) and a release needs it green. The unauthenticated API lists exactly three unresolved new-code issues, all created 2026-10-18 by the MCP-registry work, and no security hotspots:shell:S6506HTTPS should be enforced on HTTP clients following redirectsscripts/install-mcp-publisher.shcurl --proto '=https' --tlsv1.2 -fsSL --retry 3 …shell:S6506scripts/mcp-registry-publish.shcurl --proto '=https' --tlsv1.2 -fsSL …text:S8564JavaScript dependency lock file should be committedpackaging/npm/sysml-mcp/package.jsonpackaging/npm/sysml-mcp/package-lock.jsonVerified with
api/qualitygates/project_status?projectKey=Open-MBEE_OpenSysML&branch=develop(status ERROR,new_security_ratingactual 3),api/issues/search?componentKeys=Open-MBEE_OpenSysML&branch=develop&resolved=false&sinceLeakPeriod=true(the three rows above are the only issues of type VULNERABILITY / security impact) andapi/hotspots/search?projectKey=Open-MBEE_OpenSysML&branch=develop(0 hotspots). Nothing is marked won't-fix; nothing was changed in SonarCloud.curl. Both URLs were already literal
https://strings, but-Lfollowed any redirect, so aLocation:header could have moved the download to plain HTTP.--proto '=https'makes curl refuse every scheme but HTTPS on the first request and on each redirect hop;--tlsv1.2refuses older TLS. The fail (-f), silent (-s), redirect (-L), retry (--retry 3) and output flags are unchanged. Probe with a local redirector:https://localhost → Location: http://localhostis followed by the old invocation and rejected by the new one (curl: (1) Protocol "http" not supported/ exit 1).Lockfile.
@openmbee/sysml-mcpis the runner that depends only on its five optional platform packages. The lockfile is generated with the npm the nightlypublish-npmjob pins (npm@11.21.0,npm install --package-lock-only --ignore-scripts), islockfileVersion3 likeclient/node/package-lock.json, and carries the root entry only because the platform packages are not on npm yet (the same stateclient/node's lockfile is in before a release, seedocs/project/releasing.md)..gitignoreignores nopackage-lock.json;.npmignore/filesin the runner'spackage.jsondo not touch it (npm never publishes a lockfile anyway); the CircleCInpm pack/scripts/npm-mcp-test.shflow installs from tarballs and is unaffected.TestMCPRunnerLockfileAgreesWithTheManifest(tests/hygiene) now fails when a release bump leaves the lockfile behind, mirroring the existingclient/nodetest, and the release procedure regenerates both lockfiles.How SonarCloud will see this
The SonarCloud scan is a CircleCI job filtered to
mainanddevelop(.circleci/config.yml,scanwithfilters: *integration-branches), so no PR-mode analysis runs on this PR —api/project_pull_requests/listshows no entry for 1329 and there is no Sonar check here to be green. The develop gate runs in branch mode against the new-code period: this diff closes the three issues above (bothshell:S6506lines are rewritten;text:S8564is a project-level issue that clears once the lockfile exists besidepackage.json), and no other new-code security issue or hotspot is open, sonew_security_ratingon develop is expected to return to A (1) on the first develop analysis after the merge. That develop run is the proof; please re-readapi/qualitygates/project_status?projectKey=Open-MBEE_OpenSysML&branch=developonce it has run.Note that develop's gate has since gained a second failing condition this PR does not touch:
new_reliability_rating = 4from onetypescript:S2871bug ateditors/vscode/src/webview/diagram.ts:511(a.sort()on relationship kinds without a compare function, created 2026-10-20 by the diagram-panel work). Clearing the security rating here leaves the gate ERROR until that is fixed too.In-flight overlap
Checked all 19 open PRs (
refs/pull/*/head) and every PR-less branch ingit ls-remote --heads originfor edits toscripts/install-mcp-publisher.sh,scripts/mcp-registry-publish.sh,packaging/npm/sysml-mcp/,packaging/mcp/or.github/workflows/mcp-registry.ymlagainst their merge base withdevelop:chore/mdk-brand-name) changes README/CONTRIBUTING/AGENTS/docs and.github/workflows/pr.ymlonly — nothing here.feat/mcp-http), the only other MCP PR, changes the MCP server sources only — nothing here.No changelog fragment: the registry publish scripts and the npm runner are themselves unreleased (
changes/unreleased/mcp-registry.added.md,mcp-npm-runner.added.md), so there is no released behaviour to describe a change to.How it was verified
How CI runs the scripts.
.github/workflows/mcp-registry.yml(MCP Registry, onreleasepublished /workflow_dispatch) runsscripts/mcp-registry-publish.sh "$TAG", which callsscripts/install-mcp-publisher.sh(line 45 download ofmcp-publisher_<platform>.tar.gzfrom GitHub releases) and then pollshttps://registry.npmjs.org/<pkg>/<version>(line 80) beforemcp-publisher login dns/publish.make mcp-registry-check→scripts/mcp-registry-publish.sh --checkvalidates without credentials. CircleCI'spublish-npmbuilds and publishes the npm packages (npm ciinclient/node,npm packthe runner,scripts/npm-mcp-test.sh).Dry runs of the changed invocations (real network, no credentials, nothing published):
Lockfile test is load-bearing: mutating the lockfile's root
versionto0.10.0, and separately pinning@openmbee/sysml-mcp-linux-x64at0.10.0, each failsTestMCPRunnerLockfileAgreesWithTheManifestwith the regeneration hint; the committed file passes.Gate (this branch, VM):
Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.md— not needed, see abovemake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build) — no count movedF4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/2ce4197c3a6c4c13982380aaf8d6f857
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/2ce4197c3a6c4c13982380aaf8d6f857?variant=devin
Requested by: @HuiJun