-
Notifications
You must be signed in to change notification settings - Fork 12
Add ts rules #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ts rules #197
Conversation
* express-jwt-hardcoded-secret-typescript * express-jwt-hardcoded-secret-javascript
* express-jwt-hardcoded-secret-typescript * express-jwt-hardcoded-secret-javascript * node-rsa-weak-key-typescript * node-rsa-weak-key-javascript
* use-of-default-aes-java * ssl-verify-none-rust
* missing-secure-java * missing-httponly-java
* ssl-v3-is-insecure-go * missing-ssl-minversion-go
* cookie-missing-secure-flag-java * jedis-jedisfactory-hardcoded-password-java
* dont-call-system-cpp * dont-call-system-c
* blowfish-insufficient-key-size-java * tls-with-insecure-cipher-go
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * Removing python-ldap3-empty-password-python and express-jwt-hardcoded-secret-typescript --------- Co-authored-by: Sakshis <sakshil@abc.com>
…#172) * hardcoded-password-rust * empty-password-rust * secrets-reqwest-hardcoded-auth-rust --------- Co-authored-by: Sakshis <sakshil@abc.com>
* use-of-sha1-java * use-of-default-aes * use-of-blowfish --------- Co-authored-by: Sakshis <sakshil@abc.com>
…and OkHttp (#175) * system-setproperty-hardcoded-secret-java * hardcoded-secret-in-credentials-java --------- Co-authored-by: Sakshis <sakshil@abc.com>
* jedis-jedisfactory-hardcoded-password-java * java-jwt-hardcoded-secret-java * passwordauthentication-hardcoded-password-java --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * Changed folder structure for C and CPP rules --------- Co-authored-by: Sakshis <sakshil@abc.com>
#177) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * std-return-data-cpp * std-vector-invalidation-cpp * return-c-str-cpp --------- Co-authored-by: Sakshis <sakshil@abc.com>
* hardcoded-connection-password-java * datanucleus-hardcoded-connection-password-java * jedis-jedisclientconfig-hardcoded-password-java --------- Co-authored-by: Sakshis <sakshil@abc.com>
* python-ldap3-empty-password-python * python-ldap3-hardcoded-secret-python * python-mariadb-hardcoded-secret-python * python-mariadb-password-empty-python --------- Co-authored-by: Sakshis <sakshil@abc.com>
) * python-mysql-empty-password-python * python-mysql-hardcoded-secret-python * python-neo4j-hardcoded-secret-auth-python * python-neo4j-hardcoded-secret-python * python-neo4j-empty-password-python --------- Co-authored-by: Sakshis <sakshil@abc.com> Co-authored-by: Ganesh Patro <ganeshpatro321@gmail.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * python-mysqlclient-empty-password-python * python-mysqlclient-hardcoded-secret-python --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * jwt-scala-hardcode-scala * jwt-go-none-algorithm-go * changing folder location for jwt-go-none-algorithm-go * jwt-hardcode-kotlin * scala-jwt-hardcoded-secret-scala --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * string-view-temporary-string-cpp * missing-nul-cpp-string-memcpy-copy-cpp --------- Co-authored-by: Sakshis <sakshil@abc.com>
…184) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * missing-secure-java * missing-httponly-java --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * python-requests-hardcoded-secret-python * python-requests-oauth-hardcoded-secret-python --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * stacktrace-disclosure-csharp * weak-ssl-context-java * hardcoded-secret-rsa-passphrase-ruby --------- Co-authored-by: Sakshis <sakshil@abc.com>
…189) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * swift-webview-config-base-url-swift * Removed python-neo4j extra files --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * scrypt-hardcoded-secret-swift * pkcs5-hardcoded-secret-swift * hkdf-hardcoded-secret-swift * Removed python-neo4j extra files --------- Co-authored-by: Sakshis <sakshil@abc.com>
#190) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * Remove swift rules from PRs 188 and 189 --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * world-writable-file-c * world-writable-file-cpp --------- Co-authored-by: Sakshis <sakshil@abc.com>
#193) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * file-stat-before-action-c * file-stat-before-action-cpp --------- Co-authored-by: Sakshis <sakshil@abc.com>
* removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * use-ecb-mode-csharp * Delete tests/__snapshots__/use_ecb_mode-csharp-snapshot.yml --------- Co-authored-by: Sakshis <sakshil@abc.com>
…#195) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * jwt-hardcoded-secret-csharp * jwt-decode-without-verify-csharp --------- Co-authored-by: Sakshis <sakshil@abc.com>
…++ (#192) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * file-access-before-action-c * file-access-before-action-cpp * Modified file-access-before-action-c and cpp --------- Co-authored-by: Sakshis <sakshil@abc.com>
…196) * removed missing-secure-java * httponly-false-csharp * use-of-md5-digest-utils-java * removing use-of-md5-digest-utils and httponly-false-csharp * Update file-access-before-action-c rule file * Added ast-grep-essentials: true key to all rules not having this key-value pair --------- Co-authored-by: Sakshis <sakshil@abc.com>
- argon2-weak-type-typescript: Detect weak Argon2 hash type usage - avoid-crypto-rc4-typescript: Detect RC4 cryptographic usage - avoid-crypto-sha1-typescript: Detect SHA1 cryptographic usage - avoid-des-typescript: Detect DES encryption usage - chmod-permissions-typescript: Detect insecure file permission settings 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. WalkthroughThis update introduces a large set of new static analysis rules for C, C++, C#, Go, Java, JavaScript, and HTML, targeting security vulnerabilities such as hard-coded secrets, cryptographic weaknesses, insecure cookie flags, and race conditions. It also removes several outdated or redundant rules. New documentation, licensing, and contribution files are added, and a Python-based rule database tool is introduced. The Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant RuleDB_CLI
participant RuleDatabase
participant SQLiteDB
Developer->>RuleDB_CLI: init/load rules
RuleDB_CLI->>RuleDatabase: parse YAML rules
RuleDatabase->>SQLiteDB: insert rules, create FTS index
Developer->>RuleDB_CLI: query/search/stats
RuleDB_CLI->>RuleDatabase: execute SQL or search
RuleDatabase->>SQLiteDB: run SQL/FTS query
SQLiteDB-->>RuleDatabase: return results
RuleDatabase-->>RuleDB_CLI: format results
RuleDB_CLI-->>Developer: display output
Estimated code review effort🎯 5 (Critical) | ⏱️ ~90+ minutes Possibly related PRs
Suggested reviewers
Poem
Pre-Merge Checks (1 passed, 2 warnings)❌ Failed Checks (2 warnings)
✅ Passed Checks (1 passed)
Impact AnalysisUpdated static analysis rule set: new rules added and obsolete rules removedA comprehensive set of new security rules has been added across C, C++, C#, Go, Java, HTML, and JavaScript (e.g. TOCTOU checks, insecure‐hash detectors, null‐pointer, format‐string, world-writable file, JWT misuses, AngularJS SCE, plaintext HTTP links, etc.), while many older rules have been deleted (e.g. gets(), memset(), scanf(), strtok(), BinaryFormatter, Jwt-none, unsafe gRPC, insecure template types, manual sanitization, wildcard postMessage, JWT no-verify). This changes the tool’s output: new warnings will appear for the added checks, and warnings from removed rules will no longer be reported. Verify the correctness of each new rule’s AST patterns and metadata; confirm the rationale for rule removals aligns with updated security policy and doesn’t introduce blind spots. Run the full rule set on representative codebases and compare outputs before/after: ensure new rules fire on intended patterns without false positives, and that deleted rules no longer generate alerts. 🔍 Related Files
Introduce interactive RuleDatabase CLI with SQLite backend📢 Medium 🔗 Impacts API 🔄 Impacts behavior A new Python module ( Review the database schema (table definitions, indexes, FTS5 setup) and SQL handling for injection risks; ensure CLI option parsing and error messages are clear and robust. Test each CLI command ( 🔍 Related Files
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit
New Features
Bug Fixes
Chores
Documentation