ScottLogic / prompt-injection

Application which investigates defensive measures against prompt injection attacks on an LLM, with a focus on the exposure of external tools.
MIT License
13 stars 9 forks source link

Stop sending full defences on low levels #844

Closed pmarsh-scottlogic closed 4 months ago

pmarsh-scottlogic commented 5 months ago

Description

Level 1 and and 2 don't have defences. So they don't need defences stored in the backend session, nor do they need to be passed to the frontend. So I've got rid of 'em

Notes

Checklist

Have you done the following?

pmarsh-scottlogic commented 4 months ago

Right. I've done a bunch more stuff

pmarsh-scottlogic commented 4 months ago

I've restructured the tests in integration/defenceController.test. They now use the neat test.each() syntax that I saw in your other PR, and they're structured by controller method. The tests themselves haven't seen any change, apart from configure defence and reset config item, which now make sure that an error response is returned if on levels 1, 2 or 3.