-
Notifications
You must be signed in to change notification settings - Fork 42
Feature/code sandbox security v3 #26
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
f7c7b32
Refactor execution architecture with python-first model, restore bash…
haseeb-heaven a6ea0ac
Update the Sandbox and Code Exectution
haseeb-heaven 00b9466
Add mode indicator, strict safe-mode blocking, unsafe confirmations, …
haseeb-heaven a0ec52b
Release v3.2.1
haseeb-heaven 7efce77
Bump the version to 3.2.1
haseeb-heaven 2a04d48
Update Version file
haseeb-heaven 7db6f6e
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] a82a024
📝 CodeRabbit Chat: Add unit tests
coderabbitai[bot] a920cfb
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] a6810bb
fix(P0): process-group SIGKILL on timeout + Python routing in execute…
haseeb-heaven df2211a
fix(#3 #5): add export_artifacts + unquoted POSIX absolute-path block
haseeb-heaven 5b2689a
fix(safety): expand write-mode detection — close binary/pathlib/JS by…
haseeb-heaven 199030d
fix: apply CodeRabbit auto-fixes
coderabbitai[bot] 9d0d051
fix(security): P0 absolute-path read escape + artifact export symlink…
haseeb-heaven ca886ef
fix: allow read-only absolute path access in safe mode
haseeb-heaven 3e2420a
fix: block bare .write() calls on file handles in safe mode
haseeb-heaven 5ea05ed
fix(safety): add system-level destructive commands to safe-mode block…
haseeb-heaven d66a853
fix(interpreter): use _kill_process_group on timeout + ast.parse for …
haseeb-heaven 4eed614
fix(security): resolve all P1/P2 audit issues from PR #26
haseeb-heaven 6cc113c
fix(code_interpreter): use safety_manager.unsafe_mode instead of UNSA…
haseeb-heaven 3e752b7
fix(safety): resolve 3 false-positive bugs in safe-mode pattern matching
haseeb-heaven a1f3fdf
fix: two test failures — os.remove \b boundary + .write( on read-handle
haseeb-heaven b7b774d
fix: add missing claude-sonnet-4-6.json config required by TestNewCon…
haseeb-heaven 2ddf677
fix: resolve E999 SyntaxError in _WRITE_PATTERNS — replace malformed …
haseeb-heaven a385450
feat: update build_release.sh with robust helpers, add /unsafe toggle…
haseeb-heaven 6d332cb
feat: rename --unsafe to --sandbox/--no-sandbox; sandbox ON by default
haseeb-heaven bd9d629
feat: enhance build_release.sh with robust error handling
haseeb-heaven bb7174e
fix: use temp file for code exec; add /unsafe toggle; update build_re…
haseeb-heaven 874d34b
Update Indentation formatting
haseeb-heaven a9ff30f
chore: update build_release.sh with gh release fix and cleaner structure
haseeb-heaven 2714cf6
Implemented /sandbox command
haseeb-heaven 475fe64
fix: temp file exec, /unsafe toggle, build_release.sh update
haseeb-heaven 8aadac8
fix: clean up spacing/newlines in execute_code() if/else blocks
haseeb-heaven 67defc0
fix for watchdog timers issues with sandbox
haseeb-heaven 374bd3e
Merge branch 'feature/code-sandbox-security-v3' of https://github.com…
haseeb-heaven 97b8bc2
Update interpreter: fix _execute_generated_output language usage, res…
haseeb-heaven 4012b08
Release v3.2.2
haseeb-heaven a19446e
Update 3.2.2: correct code execution language, restore sandbox toggle…
haseeb-heaven fbe5d40
Update Release Notes
haseeb-heaven dbfe2c3
Update changelogs and Unit test
haseeb-heaven f4bdcf9
Updated .gitignore
haseeb-heaven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.1.0 | ||
| v3.2.1 | ||
|
coderabbitai[bot] marked this conversation as resolved.
Outdated
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| #!/bin/bash | ||
|
|
||
| VERSION_FILE="VERSION" | ||
| CHANGELOG_FILE="CHANGELOG.md" | ||
| DEFAULT_BUMP="patch" | ||
|
|
||
| confirm() { | ||
| read -p "⚠️ $1 (y/N): " choice | ||
| case "$choice" in | ||
| y|Y ) return 0 ;; | ||
| * ) echo "❌ Skipped: $1"; return 1 ;; | ||
| esac | ||
| } | ||
|
|
||
| bump_version() { | ||
| local version=$1 | ||
| local type=$2 | ||
|
|
||
| IFS='.' read -r major minor patch <<< "${version#v}" | ||
|
|
||
| case "$type" in | ||
| major) major=$((major+1)); minor=0; patch=0 ;; | ||
| minor) minor=$((minor+1)); patch=0 ;; | ||
| patch) patch=$((patch+1)) ;; | ||
| *) echo "❌ Invalid bump type"; exit 1 ;; | ||
| esac | ||
|
|
||
| echo "v$major.$minor.$patch" | ||
| } | ||
|
|
||
| # INIT VERSION | ||
| [ ! -f "$VERSION_FILE" ] && echo "v0.0.0" > $VERSION_FILE | ||
| CURRENT_VERSION=$(cat $VERSION_FILE) | ||
|
|
||
| BUMP_TYPE=${1:-$DEFAULT_BUMP} | ||
| NEW_VERSION=$(bump_version "$CURRENT_VERSION" "$BUMP_TYPE") | ||
|
|
||
| echo "🔼 Version: $CURRENT_VERSION → $NEW_VERSION" | ||
|
|
||
| # UPDATE VERSION FILE | ||
| echo "$NEW_VERSION" > $VERSION_FILE | ||
|
|
||
| # CHANGELOG | ||
| DATE=$(date +"%Y-%m-%d") | ||
| COMMITS=$(git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 2>/dev/null)..HEAD) | ||
| [ -z "$COMMITS" ] && COMMITS="- Minor updates" | ||
|
|
||
| CHANGELOG_ENTRY="\n## $NEW_VERSION ($DATE)\n$COMMITS\n" | ||
| echo -e "$CHANGELOG_ENTRY" | cat - $CHANGELOG_FILE > temp && mv temp $CHANGELOG_FILE | ||
|
|
||
| echo "📝 Changelog updated" | ||
|
|
||
| # ===================== | ||
| # CONFIRM STEPS | ||
| # ===================== | ||
|
|
||
| if confirm "Commit changes?"; then | ||
| git add . | ||
| git commit -m "Release $NEW_VERSION" || echo "⚠️ Nothing to commit" | ||
| fi | ||
|
|
||
| if confirm "Push to origin/main?"; then | ||
| git push origin main | ||
| fi | ||
|
|
||
| if confirm "Create & push tag $NEW_VERSION?"; then | ||
| git tag $NEW_VERSION | ||
| git push origin $NEW_VERSION | ||
| fi | ||
|
|
||
| if confirm "Create GitHub release?"; then | ||
| gh release create $NEW_VERSION --title "$NEW_VERSION" --generate-notes | ||
| fi | ||
|
|
||
| echo "✅ Done: $NEW_VERSION" |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.