sivang commited on
Commit
51c39bb
1 Parent(s): b6a651d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -3
README.md CHANGED
@@ -17,6 +17,16 @@ tags:
17
 
18
  SandboxLM is built on the GPT-2 architecture, a Transformer-based language model. The model has been fine-tuned on a dataset designed to help identify and classify shell commands as either safe or potentially dangerous. This makes it suitable for security advisory tasks, particularly in environments where AI agents are used to execute shell commands.
19
 
 
 
 
 
 
 
 
 
 
 
20
  ### Usage
21
 
22
  To use this model, install the `transformers` library and load the model and tokenizer as follows:
@@ -27,12 +37,20 @@ from transformers import GPT2Tokenizer, GPT2LMHeadModel
27
  tokenizer = GPT2Tokenizer.from_pretrained("your-username/sandboxlm")
28
  model = GPT2LMHeadModel.from_pretrained("your-username/sandboxlm")
29
 
30
- input_text = "rm -rf /"
 
 
 
 
 
 
31
  inputs = tokenizer(input_text, return_tensors="pt")
32
  outputs = model.generate(**inputs)
33
 
34
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
 
 
35
 
36
- ### Limitations and Biases
37
 
38
- While SandboxLM performs well in detecting potentially harmful shell commands, it may not catch all edge cases or obscure security risks. It should not be solely relied upon for mission-critical systems. It is recommended to combine it with other security measures to ensure the safety of shell operations. Additionally, since it was trained on specific datasets, it may reflect any biases present in those datasets.
 
17
 
18
  SandboxLM is built on the GPT-2 architecture, a Transformer-based language model. The model has been fine-tuned on a dataset designed to help identify and classify shell commands as either safe or potentially dangerous. This makes it suitable for security advisory tasks, particularly in environments where AI agents are used to execute shell commands.
19
 
20
+ Attention has been given to make it immediately useful:
21
+ - **SandboxLM** was trained to output JSON for maximum interoperabilty.
22
+ - Effort was made to train it on many permutations of different shell commands to increase generalization.
23
+
24
+
25
+ # Use At Your Own Risk
26
+
27
+ The products/services/information provided herein are offered on an "as is" and "as available" basis, without any warranties or representations, express or implied. The user assumes all responsibility and risk for the use of these products/services/information. We do not guarantee the accuracy, completeness, or usefulness of any information provided and expressly disclaim all liability for any damages or losses arising from their use. By utilizing these products/services/information, you acknowledge and agree that you do so entirely at your own risk.
28
+
29
+
30
  ### Usage
31
 
32
  To use this model, install the `transformers` library and load the model and tokenizer as follows:
 
37
  tokenizer = GPT2Tokenizer.from_pretrained("your-username/sandboxlm")
38
  model = GPT2LMHeadModel.from_pretrained("your-username/sandboxlm")
39
 
40
+ # To signal to the model that you want its verdict on a command,
41
+ # your prompt should follow the following structure:
42
+ # "command: <your command>"
43
+ # the output is a JSON object with two keys "risk" for the precieved risk, and "context" which you can present to a human
44
+ # to support them in deciding if to continue running the command or not.
45
+
46
+ input_text = "command: rm -rf /"
47
  inputs = tokenizer(input_text, return_tensors="pt")
48
  outputs = model.generate(**inputs)
49
 
50
  print(tokenizer.decode(outputs[0], skip_special_tokens=True))
51
+ ```
52
+
53
 
54
+ ### Limitations
55
 
56
+ While SandboxLM performs realtively well in detecting potentially harmful shell commands (and can make some even surprisingly accurate prediction even when the context it provides seems to hellucinat!), it may not catch all edge cases or obscure security risks. It should not be solely relied upon for mission-critical systems. It is recommended to combine it with other security measures to ensure the safety of shell operations. Additionally, since it was trained on specific datasets, it may reflect any biases present in those datasets.