Repository navigation
fix(security): remaining code-scanning and Dependabot alerts - #603
Merged
Merged
Conversation
- sanitize user-provided values before logging (log injection) - type-only imports for Flow annotations, drop dead code and useless assignments - shell-quote file names in the docs script - CodeQL: ignore vendored flow-typed definitions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- @axelar-network/axelarjs-sdk 0.22 - override protobufjs, toml, zod, esbuild to patched versions Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Hey - I've found 2 issues
Fixed security issues:
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="src/server/db/mongo/user-privat-provider.js" line_range="112" />
<code_context>
assertString('identifier', identifier)
- return await this.model.findOne({ identifier }).lean()
+ return await this.model.findOne({ identifier: String(identifier) }).lean()
}
</code_context>
<issue_to_address>
**Hash lookup remains uncoerced**
`getByIdentifierHash` still passes `identifier` directly into each `$or` query value after `assertString`; because the query values are not converted to primitives at the query site, the NoSQL-scanning alert for this path remains despite the other query changes.
Convert `identifier` to a primitive string in each `$or` query value in `getByIdentifierHash`.
</issue_to_address>
### Comment 2
<location path=".github/codeql/codeql-config.yml" line_range="4" />
<code_context>
+name: GoodServer CodeQL config
+paths-ignore:
+ # vendored third-party Flow library definitions (not our code, and not valid plain JS)
+ - flow-typed
</code_context>
<issue_to_address>
**Flow definitions remain scanned**
When codeQL evaluates files beneath the `flow-typed/` directory, codeQL matches repository file paths against `paths-ignore`, but `flow-typed` does not match files such as `flow-typed/npm/babel-core_vx.x.x.js`, so the vendored definitions remain in the scan and the reported alerts are not excluded.
Use a glob that matches the directory’s contents, such as `flow-typed/**`.
</issue_to_address>Sourcery assessment
Needs a human reviewer. 2 findings to address first, and if code can be absent, removing its guard may let the verification-email path proceed with a missing code; reverting would not unsend emails already delivered. The dependency and query changes are otherwise reversible, but this outbound side effect can outlive the revert.
Blocking findings: src/server/db/mongo/user-privat-provider.js:112, .github/codeql/codeql-config.yml:4
- codeql: ignore flow-typed/** (glob matches the files) - getByIdentifierHash: coerce every $or value to a string - sanitizeLog: always replace on a string so CodeQL recognises the sanitizer - drop the redundant email check (already validated above) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sourcery-ai
Bot
dismissed
their stale review
November 16, 2026 09:01
Sourcery withdrew this approval because the latest commits introduced blocking findings.
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.
Summary
Follow-up to #602 after
switch-to-viemwas merged: handles the alerts that were still open onmaster.Code scanning (38 open)
sanitizeLoghelper strips line breaks from user-provided values in the flagged log calls (+ test)import type(CodeQL could not see annotation usage):Router,UserRecord,IdScan*last_claim,methodToInvoke,!code,alreadyIndexed), the duplicateresolvekey inwebpack.dev.config.js, and dead functions inscripts/docs.js; file names passed toexecare now shell-quotedflow-typed/excluded from CodeQL (.github/codeql/codeql-config.yml)String()so CodeQL recognises it; if it does not, those alerts are false positives (inputs are already rejected unless strings)Dependabot (60 open)
@axelar-network/axelarjs-sdk0.22; overrides forprotobufjs,toml,zod,esbuildkms-ethereum-signing, no patch, or dev-only tooling): listed indocs/security-triage-2026-11-15.mdTests: 281 pass (29 skipped),
pnpm lintclean, production build OK.🤖 Generated with Claude Code
Summary by Sourcery
Resolve the remaining actionable CodeQL and Dependabot security findings while documenting alerts that require upstream fixes or larger upgrades.
New Features:
Bug Fixes:
Enhancements:
CI:
Documentation:
Tests: