harden: remove hardcoded secret in index.js... - #355
Open
anupamme wants to merge 2017 commits into
Open
Conversation
# Conflicts: # browser/modules/sqlQuery.js # package-lock.json # package.json
…clude minimal JWT decoding and streamlined persistence handling. Update session backend to support superuser parameter.
… SQL queries. Introduce `quoteRelation` utility for safe formatting.
…inor initialization updates.
…d configuration details.
…inor initialization updates.
…d configuration details.
…on for improved visibility
…mples, including buffer setup, metadata usage, and SQL analysis.
…y across modules.
…for React 18 compliance.
…ackage-lock.json`
…te version to 2025.11.1
…-lock.json` accordingly.
Prevent redundant '?' when appending query parameters to WMTS URL.
…c error handling Integrate `express-async-errors` to forward async route rejections to a central error handler. Implement a middleware-based error handler for consistent error responses.
…ling Switch from `request` to modern `fetch` API, leveraging `express-async-errors` for centralized async error handling. Streamline error checks and parsing logic for improved readability.
…andling Replace deprecated `request` library with modern `fetch` across controllers. Simplify async handling and response/error processing for improved readability and code consistency. Update copyright to 2026.
…lt behavior fix and refactor details
…roper handling of JSON payloads
…downloads Ensure `whereClause` defaults to '1=1' when no filters are active. Add versioning check to filter out ended versions in downloads.
…tom executable path in Docker
… fixes and timeout improvements
…sary Chromium downloads
… missing meta data
…ew option selection and modularize click event handling
…improve error reporting
…nd improve error event handling
…d street view drawer improvements
… en_US locale files
…et.express-session-hardcoded-secret security vulnerability Automated security fix generated by OrbisAI Security
Contributor
|
@mapcentia: Relevant commit: eb5c10f |
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
Harden input handling in
index.js(flagged by semgrep).Vulnerability
javascript.express.security.audit.express-session-hardcoded-secret.express-session-hardcoded-secretindex.js:91Description: A hard-coded credential was detected. It is not recommended to store credentials in source-code, as this risks secrets being leaked and used by either an internal or external malicious adversary. It is recommended to use environment variables to securely provide credentials or retrieve credentials from a secure vault or HSM (Hardware Security Module).
Threat Model Context
This is a web service - vulnerabilities in request handlers are directly exploitable by remote attackers.
Changes
index.jsBehavior Preservation
The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.
This patch removes an exploit primitive — a code pattern that, while not independently exploitable today, could be chained with other weaknesses by automated exploit-development tooling. Proactive removal of such primitives raises the bar against increasingly capable automated attack tools.
Automated security fix by OrbisAI Security