Skip to content

Commit 36ec57b

Browse files
author
Sakshis
committed
modification in node-rsa-weak-key-typescript
1 parent b76f3be commit 36ec57b

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

rules/typescript/security/node-rsa-weak-key-typescript.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ utils:
162162
stopBy: neighbor
163163
kind: property_identifier
164164
- has:
165-
stopBy: neighbor
165+
stopBy: end
166166
kind: number
167167
- any:
168168
- follows:
@@ -382,6 +382,9 @@ utils:
382382
stopBy: end
383383
kind: property_identifier
384384
regex: '^modulusLength$'
385+
- has:
386+
stopBy: end
387+
kind: number
385388
- any:
386389
- follows:
387390
stopBy: end
@@ -495,7 +498,7 @@ utils:
495498
kind: property_identifier
496499
regex: '^modulusLength$'
497500
- has:
498-
stopBy: neighbor
501+
stopBy: end
499502
kind: number
500503
pattern: $R
501504
- any:
@@ -573,4 +576,5 @@ rule:
573576
- matches: MATCH_BITS_WITHIN_FUNCTION_WITH_CRYPTO
574577
constraints:
575578
R:
576-
regex: '^(-?(0|[1-9][0-9]?|[1-9][0-9]{2}|1[0-9]{3}|20[0-3][0-9]|204[0-7])(\.[0-9]+)?|0|-[1-9][0-9]*|-[1-9][0-9]{2,}|-1[0-9]{3}|-20[0-3][0-9]|-204[0-7])$'
579+
regex: ^(-?(0|[1-9][0-9]{0,2}|1[0-9]{3}|20[0-3][0-9]|204[0-7])(\.[0-9]+)?)$
580+

tests/__snapshots__/node-rsa-weak-key-typescript-snapshot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ snapshots:
202202
style: secondary
203203
start: 105
204204
end: 118
205+
- source: '512'
206+
style: secondary
207+
start: 120
208+
end: 123
205209
- source: 'modulusLength: 512'
206210
style: secondary
207211
start: 105

0 commit comments

Comments
 (0)