fix(security): validate and restrict /api/instructions operation and topic params (CWE-22, CWE-1321) (#986)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// Allowed values for /api/instructions security
|
||||
export const ALLOWED_OPERATIONS = [
|
||||
'search',
|
||||
'context',
|
||||
'summarize',
|
||||
'import',
|
||||
'export'
|
||||
];
|
||||
|
||||
export const ALLOWED_TOPICS = [
|
||||
'workflow',
|
||||
'search_params',
|
||||
'examples',
|
||||
'all'
|
||||
];
|
||||
Reference in New Issue
Block a user