Skip to content

Commit 53c1653

Browse files
author
Amine Mouafik
committed
feat(paths): enforce paths format validation
1 parent 2e953a8 commit 53c1653

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ const sourceCodeSchema = Joi.object()
3636
description: Joi.string().required(),
3737
// cvss_score: Joi.number().required(),
3838
location: Joi.object().keys({
39-
path: Joi.string().required(),
39+
path: Joi.string()
40+
.regex(/^(?!\/opt\/mount\/|.\/|\/).*/)
41+
.required(),
4042
positions: Joi.object().keys({
4143
begin: Joi.object()
4244
.keys({

0 commit comments

Comments
 (0)