AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

add command shell blacklist and whitelist

Open Wladastic opened this issue 2 years ago • 5 comments
trafficstars

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

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

Wladastic avatar May 07 '23 11:05 Wladastic

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

vercel[bot] avatar May 07 '23 11:05 vercel[bot]

Codecov Report

Patch coverage: 26.92% and project coverage change: -0.25 :warning:

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%) :arrow_down:
autogpt/config/config.py 73.86% <50.00%> (-1.14%) :arrow_down:

... and 1 file with indirect coverage changes

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

codecov[bot] avatar May 07 '23 11:05 codecov[bot]

Deployment failed with the following error:

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

vercel[bot] avatar May 16 '23 10:05 vercel[bot]

Echoing the sentiment from https://github.com/Significant-Gravitas/Auto-GPT/pull/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.

lc0rp avatar May 16 '23 12:05 lc0rp

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 avatar May 16 '23 14:05 Wladastic

Deployment failed with the following error:

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

vercel[bot] avatar May 18 '23 09:05 vercel[bot]

Deployment failed with the following error:

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

vercel[bot] avatar May 19 '23 17:05 vercel[bot]

Deployment failed with the following error:

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

vercel[bot] avatar May 19 '23 17:05 vercel[bot]