-
Notifications
You must be signed in to change notification settings - Fork 27
Migrate to OpenAI-like API with enhanced security #3
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
Open
finettt
wants to merge
9
commits into
bravenewxyz:main
Choose a base branch
from
finettt:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…on validation - Add command sanitization to prevent shell injection attacks - Replace system() with popen() for safer command execution - Add validation for dangerous characters and shell constructs - Enhance configuration system with environment variable validation - Add proper error handling and buffer size checks - Improve JSON escaping to prevent injection attacks BREAKING CHANGE: Environment variable names changed from OR_KEY to OPENAI_KEY, and OPENAI_BASE and OPENAI_MODEL are now required
Replace OpenRouter integration with OpenAI API support, implement robust shell command sanitization, and introduce Napoleon Dynamite personality module. Add multi-step command chaining capabilities and update build configuration for new dependencies.
- Add GitHub Actions CI matrix build with basic tests - Add release workflow to build, checksum, and upload assets - Implement RAG via grep-based local context search - Add CLI args: --rag PATH and --rag-snippets N; env vars RAG_* - Integrate RAG snippets into user prompt when enabled - Add args.c and rag.c; extend Config with RAG fields - Move sources to src/ and update Makefile SOURCES - Escape control characters in JSON content - Secure temp files with 0600 and switch to exit() - Update README and relocate preview to docs/
… and RAG support - Add GitHub Actions CI matrix build with basic tests - Add release workflow to build, checksum, and upload assets - Implement RAG via grep-based local context search - Add CLI args: --rag PATH and --rag-snippets N; env vars RAG_* - Integrate RAG snippets into user prompt when enabled - Add args.c and rag.c; extend Config with RAG fields - Move sources to src/ and update Makefile SOURCES - Escape control characters in JSON content - Secure temp files with 0600 and switch to exit() - Update README and relocate preview to docs/
- Validate and sanitize path to prevent injection/traversal - Resolve paths with realpath and ensure they stay within CWD - Use resolved path in grep command - Add Windows realpath/getcwd shims and required headers
- Update Makefile to improve build flags and streamline Windows build process. - Implement platform-specific clean and install commands for better user experience. - Enhance command execution in agent.c with stricter sanitization and error handling. - Remove deprecated GitHub Actions CI workflow file. - Update README to reflect changes in API base URL and installation instructions.
| messages[sizeof(messages) - 1] = '\0'; | ||
| } else { | ||
| strcat(messages, "]"); | ||
| } |
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.
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.
Replace OpenRouter integration with OpenAI-like API support, implement robust shell command sanitization, and introduce Napoleon Dynamite personality module. Add multi-step command chaining capabilities and update build configuration for new dependencies.