Skip to content

Comments

🛡️ Sentinel: [CRITICAL/HIGH] Fix hardcoded secrets and Stored XSS#22

Open
richkmeli wants to merge 1 commit intomasterfrom
sentinel-fix-secrets-and-xss-4633546942512473564
Open

🛡️ Sentinel: [CRITICAL/HIGH] Fix hardcoded secrets and Stored XSS#22
richkmeli wants to merge 1 commit intomasterfrom
sentinel-fix-secrets-and-xss-4633546942512473564

Conversation

@richkmeli
Copy link
Owner

This submission addresses two major security concerns in the Richkware-Manager-Server:

  1. Hardcoded Secrets (CRITICAL): Removed default values for DB_PASSWORD and ENCRYPTION_KEY across multiple configuration files. The application now follows the "Secure by Default" principle, requiring explicit environment variable configuration and failing securely if they are missing.
  2. Stored XSS (HIGH): The devices dashboard was vulnerable to Stored XSS because it rendered device-supplied names and other data using string concatenation and .innerHTML. I refactored the table generation logic in devices.js to use jQuery's safe methods, ensuring all data is properly encoded before being added to the DOM.

Manual verification was performed for all changes. Automated tests and frontend verification with Playwright were attempted but failed due to the environment's missing GITHUB_TOKEN for private dependencies.


PR created automatically by Jules for task 4633546942512473564 started by @richkmeli

- Removed hardcoded default credentials and secrets from Dockerfile, docker-compose.yml, .env.example, and application-docker.properties to enforce runtime configuration via environment variables (Secure by Default).
- Refactored src/main/resources/static/js/rms/devices.js to use jQuery's safe DOM construction methods (.text(), .attr(), and event handlers) instead of .innerHTML and inline event attributes, fixing a Stored XSS vulnerability in the devices dashboard.
- Created security journal at .jules/sentinel.md documenting these critical findings and patterns.

Co-authored-by: richkmeli <7313162+richkmeli@users.noreply.github.com>
@google-labs-jules
Copy link
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant