- Notifications
You must be signed in to change notification settings - Fork 4
Add pgvector as default KB store #152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Entelligence AI Vulnerability ScannerStatus: No security vulnerabilities found Your code passed our comprehensive security analysis. |
Review Summary🏷️ Draft Comments (4)
|
Review Summary |
| COPY init-dbs.sh /docker-entrypoint-initdb.d/init-dbs.sh | ||
| RUN chmod +x /docker-entrypoint-initdb.d/init-dbs.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security: init-dbs.sh is copied and made executable without verifying its integrity or source, allowing a malicious or tampered script to execute arbitrary commands as root during container build or startup.
🤖 AI Agent Prompt for Cursor/Windsurf
📋 Copy this prompt to your AI coding assistant (Cursor, Windsurf, etc.) to get help fixing this issue
In Dockerfile.pgvector, lines 3-4, the script `init-dbs.sh` is copied and made executable without verifying its integrity or restricting its permissions. This allows a malicious or tampered script to execute arbitrary commands as root during build or container startup. Update these lines to: (1) set permissions to 700, (2) change ownership to the intended user (e.g., postgres), and (3) verify the script's SHA256 hash before execution. Replace `<EXPECTED_SHA256_HASH>` with the actual hash value. 📝 Committable Code Suggestion
‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.
| COPY init-dbs.sh /docker-entrypoint-initdb.d/init-dbs.sh | |
| RUN chmod +x /docker-entrypoint-initdb.d/init-dbs.sh | |
| COPY init-dbs.sh /docker-entrypoint-initdb.d/init-dbs.sh | |
| RUN chmod 700 /docker-entrypoint-initdb.d/init-dbs.sh \ | |
| && chown postgres:postgres /docker-entrypoint-initdb.d/init-dbs.sh \ | |
| && sha256sum /docker-entrypoint-initdb.d/init-dbs.sh | grep -q '<EXPECTED_SHA256_HASH>' |
Review Summary |
Review Summary |
Adds a pgvector container and uses it as the default KB store. Requires building our own pgvector container in order to include an init script that ensures DBs are created.