Skip to content

Commit 4b23b8f

Browse files
committed
Add TypeScript security rules and tooling
- Add ts-node security rules for runtime protection
1 parent 7312010 commit 4b23b8f

File tree

195 files changed

+5244
-85
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

195 files changed

+5244
-85
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,4 @@ cscope.in.out
197197
cscope.po.out
198198

199199
# End of https://www.toptal.com/developers/gitignore/api/node,tags,macos
200+
.claude

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
"devDependencies": {
1515
"@ast-grep/cli": "^0.31.1"
1616
}
17-
}
17+
}

rules/c/security/null-library-function-c.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,4 @@ rule:
259259
- inside:
260260
stopBy: end
261261
kind: return_statement
262-
262+

rules/cpp/security/null-library-function-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,4 @@ rule:
259259
- inside:
260260
stopBy: end
261261
kind: return_statement
262-
262+

rules/go/security/grpc-client-insecure-connection-go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ rule:
6363
kind: ERROR
6464
- has:
6565
stopBy: end
66-
kind: ERROR
66+
kind: ERROR

rules/html/security/plaintext-http-link-html.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ rule:
7777
stopBy: end
7878
kind: attribute_value
7979
regex: ^([Hh][Tt][Tt][Pp]://)
80-
80+

rules/java/security/hardcoded-connection-password-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,4 +349,4 @@ rule:
349349
- matches: (jdo.PersistenceManagerFactory $JDO). ... .$SETPASS("...")
350350
- matches: (jdo.PersistenceManagerFactory $JDO). ... .$SETPASS("...")_with_Instance
351351
- matches: (PersistenceManagerFactory $JDO). ... .$SETPASS("...")
352-
- matches: (PersistenceManagerFactory $JDO). ... .$SETPASS("...")_with_Instance
352+
- matches: (PersistenceManagerFactory $JDO). ... .$SETPASS("...")_with_Instance

rules/java/security/java-jwt-hardcoded-secret-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ rule:
126126
kind: ERROR
127127
- inside:
128128
stopBy: end
129-
kind: ERROR
129+
kind: ERROR

rules/java/security/jedis-jedisclientconfig-hardcoded-password-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,4 +827,4 @@ rule:
827827
- matches: clients.jedis.DefaultJedisClientConfig.Builder $JEDIS).password("...")
828828
- matches: clients.jedis.DefaultJedisClientConfig.create($CONNECTIONTIMEOUTMILLIS, $SOTIMEOUTMILLIS, $BLOCKINGSOCKETTIMEOUTMILLIS, $USER, "...")
829829
- matches: new clients.jedis.DefaultJedisClientConfig($CONNECTIONTIMEOUTMILLIS, $SOTIMEOUTMILLIS, $BLOCKINGSOCKETTIMEOUTMILLIS, $USER, "...")
830-
- matches: (clients.jedis.JedisClientConfig|clients.jedis.DefaultJedisClientConfig $JEDIS).updatePassword("...")
830+
- matches: (clients.jedis.JedisClientConfig|clients.jedis.DefaultJedisClientConfig $JEDIS).updatePassword("...")

rules/java/security/use-of-default-aes-java.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,4 @@ constraints:
317317
all:
318318
- has:
319319
kind: string_fragment
320-
regex: ^\s*(AES)\s*$
320+
regex: ^\s*(AES)\s*$

0 commit comments

Comments
 (0)