Skip to content

Commit 7dd8d22

Browse files
authored
Merge pull request DeusData#1333 from DeusData/fix/no-inprocess-update
fix(security): declare the printed install-script URL on the allow-list
2 parents 3e2f9a0 + 0b31a5d commit 7dd8d22

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎scripts/security-allowlist.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ src/ui/http_server.c:execl:exec indexing binary in child process
6666
URL:https://api.github.com/repos/DeusData/codebase-memory-mcp/releases/latest:update check
6767
URL:https://github.com/DeusData/codebase-memory-mcp/releases/latest/download:binary download + checksums
6868
URL:https://github.com/DeusData/codebase-memory-mcp/releases/latest:version check via redirect header
69+
URL:https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh:printed by `update` as the install-script command when install.sh is not beside the binary (a string in the message, not a network call - the binary no longer downloads anything)
6970
URL:http://127.0.0.1:UI server binding (localhost only)
7071
URL:https://www.sqlite.org/c3ref/c_checkpoint_full.html:sqlite WAL checkpoint API doc reference (comment only, not a network call)
7172
URL:https://github.com/DeusData/codebase-memory-mcp:project repository self-reference in update/star notice (src/mcp/mcp.c)

‎src/cli/cli.c‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11168,6 +11168,12 @@ static bool check_already_latest(void) {
1116811168

1116911169
#endif /* CBM_CLI_ENABLE_TEST_API */
1117011170

11171+
/* One token on purpose: the security audit extracts URLs literally, so a URL
11172+
* split across string-literal continuations cannot be matched against the
11173+
* allow-list. Printed for the user to paste; never fetched by this binary. */
11174+
#define CBM_INSTALL_SH_URL \
11175+
"https://raw.githubusercontent.com/DeusData/codebase-memory-mcp/main/install.sh"
11176+
1117111177
int cbm_cmd_update(int argc, char **argv) {
1117211178
parse_auto_answer(argc, argv);
1117311179

@@ -11257,8 +11263,7 @@ int cbm_cmd_update(int argc, char **argv) {
1125711263
if (have_dir) {
1125811264
printf(" bash \"%s/install.sh\"\n\n", self_dir);
1125911265
} else {
11260-
printf(" curl -fsSL https://raw.githubusercontent.com/DeusData/"
11261-
"codebase-memory-mcp/main/install.sh | bash\n\n");
11266+
printf(" curl -fsSL " CBM_INSTALL_SH_URL " | bash\n\n");
1126211267
}
1126311268
printf("It downloads the latest release, verifies its checksum, and replaces\n"
1126411269
"this binary in place. install.sh is idempotent, so re-running it IS\n"

0 commit comments

Comments
 (0)