Skip to content
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

add command shell blacklist and whitelist #3950

Conversation

Wladastic
Copy link
Contributor

@Wladastic Wladastic commented May 7, 2023

Background

There is only a command category whitelist and blacklist.

Changes

Added the ability to restrict shell_commands by keywords, to avoid that the instance keeps running into ui interfaces that have no return.

Documentation

Add your list of keywords to be forbidden.
When you add a keyword to the whilelist, only those keywords from the whitelist are allowed.

Test Plan

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@vercel
Copy link

vercel bot commented May 7, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview May 19, 2023 5:30pm

@github-actions github-actions bot added the size/l label May 7, 2023
@codecov
Copy link

codecov bot commented May 7, 2023

Codecov Report

Patch coverage: 26.92% and project coverage change: -0.25 ⚠️

Comparison is base (ccc03c1) 62.91% compared to head (f699ede) 62.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3950      +/-   ##
==========================================
- Coverage   62.91%   62.66%   -0.25%     
==========================================
  Files          74       74              
  Lines        3400     3426      +26     
  Branches      495      504       +9     
==========================================
+ Hits         2139     2147       +8     
- Misses       1112     1123      +11     
- Partials      149      156       +7     
Impacted Files Coverage Δ
autogpt/commands/execute_code.py 58.62% <16.66%> (-10.95%) ⬇️
autogpt/config/config.py 73.86% <50.00%> (-1.14%) ⬇️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Wladastic Wladastic changed the title add blacklist and whitelist add command shell blacklist and whitelist May 8, 2023
.env.template Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview May 15, 2023 23:15 Inactive
@vercel
Copy link

vercel bot commented May 16, 2023

Deployment failed with the following error:

Resource is limited - try again in 1 hour (more than 100, code: "api-deployments-free-per-day").

@lc0rp
Copy link
Contributor

lc0rp commented May 16, 2023

Echoing the sentiment from #2644.

The proposal to use "denylist" and "allowlist" instead of "blacklist" and "whitelist" was made to encourage more inclusive language in the codebase. These terms are considered more neutral alternatives.

@Wladastic
Copy link
Contributor Author

Echoing the sentiment from #2644.

The proposal to use "denylist" and "allowlist" instead of "blacklist" and "whitelist" was made to encourage more inclusive language in the codebase. These terms are considered more neutral alternatives.

In the code it says allow and deny already.
Are you implying to use denylist and allowlist as well here?
It makes less sense in that context I think

@Wladastic Wladastic requested a review from k-boikov May 16, 2023 14:37
@vercel vercel bot temporarily deployed to Preview May 18, 2023 06:19 Inactive
@vercel
Copy link

vercel bot commented May 18, 2023

Deployment failed with the following error:

Resource is limited - try again in 33 minutes (more than 100, code: "api-deployments-free-per-day").

@Wladastic Wladastic requested a review from k-boikov May 18, 2023 13:53
@vercel
Copy link

vercel bot commented May 19, 2023

Deployment failed with the following error:

Resource is limited - try again in 34 minutes (more than 100, code: "api-deployments-free-per-day").

@vercel
Copy link

vercel bot commented May 19, 2023

Deployment failed with the following error:

Resource is limited - try again in 26 minutes (more than 100, code: "api-deployments-free-per-day").

@richbeales richbeales merged commit bf33f4a into Significant-Gravitas:master May 19, 2023
8 of 10 checks passed
ppetermann pushed a commit to ppetermann/Auto-GPT that referenced this pull request May 22, 2023
Co-authored-by: k-boikov <64261260+k-boikov@users.noreply.github.com>
Co-authored-by: Nicholas Tindle <nick@ntindle.com>
Co-authored-by: Richard Beales <rich@richbeales.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants