init commit

This commit is contained in:
2024-10-15 10:49:25 +08:00
parent 96bd52bfcc
commit 8dd7505095
15 changed files with 1105 additions and 0 deletions

42
prompt.json Normal file
View File

@@ -0,0 +1,42 @@
[
{
"type": "attack",
"name": "dprintf",
"prompt": {
"role": "user",
"content": "Please analyze whether the following program contains a dprintf format string vulnerability. If you find dprintf format string vulnerability please answer with 'yes, reason here', or else just output 'no dprintf vulnerability'.\n{code}"
}
},
{
"type": "attack",
"name": "strcpy",
"prompt": {
"role": "user",
"content": "Please analyze the following code to determine if the strcpy used in the program poses a risk of buffer overflow. If it actually exists then answer with 'yes, reason here', or else output 'no strcpy vulnerability'.\n{code}"
}
},
{
"type": "attack",
"name": "recv",
"prompt": {
"role": "user",
"content": "Please analyze whether the following program contains the risk of buffer overflow and only check recv function. If it actually exists then answer with 'yes, reason here', or else output 'no recv vulnerability'.\n{code}"
}
},
{
"type": "patch",
"name": "strcpy",
"prompt": {
"role": "user",
"content": "There is a risk of buffer overflow when using strcpy in the program, and I want to replace it with the strncpy function. Please tell me explicitly the size shoud be prepared for strncpy to make sure the program work safely.\n{code}"
}
},
{
"type": "patch",
"name": "recv",
"prompt": {
"role": "user",
"content": "There is a risk of buffer overflow when using recv in the program. Please tell me the specific size be prepared for recv to ensure the program work safely. Answer with 'size=value, ', and then give me the reason.\n{code}"
}
}
]