-
Notifications
You must be signed in to change notification settings - Fork 9
feat: add JavaScript OWASP Top 10 security rules and enhanced installer functionality #5
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
Conversation
…rules Added proper descriptions and file glob patterns for Drupal, Python, and JavaScript OWASP Top 10 security rules. Updated all ten JavaScript OWASP security rule files with standardised metadata and proper glob patterns. Standardised metadata format by removing duplicate description fields and ensuring consistent structure across all rule files.
…rules Added proper descriptions and file glob patterns for Drupal, Python, and JavaScript OWASP Top 10 security rules. Updated all ten JavaScript OWASP security rule files with standardised metadata and proper glob patterns. Standardised metadata format by removing duplicate description fields and ensuring consistent structure across all rule files.
…rules Added proper descriptions and file glob patterns for Drupal, Python, and JavaScript OWASP Top 10 security rules. Updated all ten JavaScript OWASP security rule files with standardised metadata and proper glob patterns. Standardised metadata format by removing duplicate description fields and ensuring consistent structure across all rule files.
…alauorg/cursorrules into feat/addtional-js-owasp-rules
Merge feat/addtional-js-owasp-rules branch resolving all conflicts: - Added 10 new JavaScript OWASP Top 10 security rules - Enhanced installer with tag-based filtering and JavaScript rule support - Standardized metadata format across all OWASP security rules - Added .cursorignore file installation capability - Updated README with comprehensive security rules documentation - Maintained version 1.0.4 while preserving all feature enhancements Files merged: - 10 OWASP security .mdc files with standardized metadata - install.php with JavaScript rules and enhanced functionality - README.md with complete security rules documentation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @ivangrynenko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
Hello team,
Gemini here, providing a summary for this pull request authored by @ivangrynenko. This PR introduces a significant enhancement by adding a comprehensive set of JavaScript OWASP Top 10 security rules. It also includes major improvements to the installation script, making it more flexible and user-friendly, particularly through the introduction of a tag-based filtering system. Additionally, it incorporates recommended .cursorignore files and standardizes metadata across several existing rules, resolving conflicts from a previous PR (#3).
Overall, this is a substantial update that expands the security coverage to JavaScript applications and streamlines the rule installation process.
Highlights
- New JavaScript Security Rules: Adds 10 new Cursor rules specifically designed to detect and prevent vulnerabilities related to the OWASP Top 10:2021 list for JavaScript applications (covering A01-A10).
- Enhanced Installer Functionality: Introduces a powerful tag-based filtering system (
--tags,--tag-preset) to selectively install rules. Adds a dedicated--javascriptoption and improves the interactive installation menu. Includes logic to automatically install recommended.cursorignoreand.cursorindexingignorefiles. - Tag System Documentation: Adds a new
TAG_STANDARDS.mdfile providing detailed documentation on the standardized tagging system used for categorizing rules. - Rule Standardization and Cleanup: Updates existing Drupal and Python security rules with proper descriptions and
globspatterns. Performs minor cleanup on metadata and formatting in several other rule files. - .cursorignore Files: Adds standard
.cursorignoreand.cursorindexingignorefiles to help Cursor AI focus on relevant code and improve performance.
Changelog
Click here to see the changelog
- .cursor/rules/cursor-rules.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursor/rules/drupal-authentication-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-broken-access-control.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-cryptographic-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-injection.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-insecure-design.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-integrity-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-logging-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-security-misconfiguration.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/drupal-ssrf.mdc
- Added metadata block (description, globs, alwaysApply).
- Fixed a regex pattern (line 39).
- Removed trailing newline.
- .cursor/rules/drupal-vulnerable-outdated-components.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/git-commit-standards.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursor/rules/govcms-saas.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursor/rules/improve-cursorrules-efficiency.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursor/rules/javascript-broken-access-control.mdc
- Added new rule for OWASP A01 (Broken Access Control) in JavaScript/TypeScript.
- .cursor/rules/javascript-cryptographic-failures.mdc
- Added new rule for OWASP A02 (Cryptographic Failures) in JavaScript/TypeScript.
- .cursor/rules/javascript-identification-authentication-failures.mdc
- Added new rule for OWASP A07 (Identification and Authentication Failures) in JavaScript/TypeScript.
- .cursor/rules/javascript-injection.mdc
- Added new rule for OWASP A03 (Injection) in JavaScript/TypeScript.
- .cursor/rules/javascript-insecure-design.mdc
- Added new rule for OWASP A04 (Insecure Design) in JavaScript/TypeScript.
- .cursor/rules/javascript-performance.mdc
- Removed duplicate metadata block.
- Removed
filterssection. - Removed trailing newline.
- .cursor/rules/javascript-security-logging-monitoring-failures.mdc
- Added new rule for OWASP A09 (Security Logging and Monitoring Failures) in JavaScript/TypeScript.
- .cursor/rules/javascript-security-misconfiguration.mdc
- Added new rule for OWASP A05 (Security Misconfiguration) in JavaScript/TypeScript.
- .cursor/rules/javascript-server-side-request-forgery.mdc
- Added new rule for OWASP A10 (Server-Side Request Forgery) in JavaScript/TypeScript.
- .cursor/rules/javascript-software-data-integrity-failures.mdc
- Added new rule for OWASP A08 (Software and Data Integrity Failures) in JavaScript/TypeScript.
- .cursor/rules/javascript-standards.mdc
- Removed duplicate metadata block.
- Removed
filterssection. - Removed trailing newline.
- .cursor/rules/javascript-vulnerable-outdated-components.mdc
- Added new rule for OWASP A06 (Vulnerable and Outdated Components) in JavaScript/TypeScript.
- .cursor/rules/node-dependencies.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursor/rules/python-authentication-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-broken-access-control.mdc
- Added metadata block (description, globs, alwaysApply).
- Updated metadata priority and version format (lines 125-126).
- Updated tags for consistency (lines 128-140).
- Updated references format (lines 142-148).
- Removed trailing newline.
- .cursor/rules/python-cryptographic-failures.mdc
- Added metadata block (description, globs, alwaysApply).
- .cursor/rules/python-injection.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-insecure-design.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-integrity-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-logging-monitoring-failures.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-security-misconfiguration.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/python-ssrf.mdc
- Added detailed description.
- .cursor/rules/python-vulnerable-outdated-components.mdc
- Added detailed description.
- Updated
globspattern for consistency.
- .cursor/rules/secret-detection.mdc
- Added new rule for detecting secrets.
- Removed trailing newline.
- .cursor/rules/tests-documentation-maintenance.mdc
- Removed duplicate metadata block.
- Removed trailing newline.
- .cursorignore
- Added new file with standard ignore patterns for Cursor AI.
- .cursorindexingignore
- Added new file with standard indexing ignore patterns for Cursor AI.
- README.md
- Corrected spelling of 'optimizations' to 'optimisations' (lines 12, 206, 219, 224, 309, 429, 432, 460).
- Added installation example using tag expression (lines 51-54).
- Added documentation for
.cursorignorefiles and the--ignore-filesoption (lines 85-100). - Added documentation and examples for tag-based rule selection and tag presets (lines 140-177).
- Corrected spelling of 'organization' to 'organisation' (lines 203, 223, 384, 456, 462).
- Added new JavaScript OWASP rules to the list of available rules (lines 249-258).
- Added
secret-detection.mdcto the list of available rules (line 260). - Removed duplicate
security-practices.mdcentry (line 296). - Corrected spelling of 'Customization' to 'Customisation' (line 311).
- Corrected spelling of 'Organizations' to 'Organisations' (line 406).
- Corrected spelling of 'Categorization' to 'Categorisation' (line 443, 448).
- TAG_STANDARDS.md
- Added new file documenting the standardized tag hierarchy, format, types, and usage.
- install.php
- Updated script header documentation (lines 1-18).
- Added
COLORSconstant for colored output (lines 27-36). - Added
TAG_PRESETSconstant defining common tag combinations (lines 39-58). - Added
--javascriptoption and-jalias (lines 69, 837-840). - Added
--tagsand--tag-presetoptions (lines 70-71, 807-808, 861-864). - Added
--ignore-filesoption (lines 72, 809, 865-873). - Updated option conflict check to include new options (lines 92-96).
- Updated interactive menu to include new options (lines 241-245).
- Updated rule selection logic to include JavaScript rules and handle tag filtering (lines 216-313).
- Updated source directory finding logic (lines 315-327).
- Removed local file fallback logic during GitHub download (lines 420-424).
- Added
filtered_countvariable to track rules skipped by tags (line 528). - Added logic to skip rules that don't match the tag filter (lines 540-547).
- Added summary output for tag filtering (lines 570-573).
- Added logic to install
.cursorignoreand.cursorindexingignorefiles based on the--ignore-filesoption (lines 596-681). - Added
rule_matches_tag_filterfunction to check if a rule file's tags match an expression (lines 693-720). - Added
evaluate_tag_expressionfunction to parse and evaluate tag expressions (lines 723-762). - Updated help message to include new options, tag presets, and examples (lines 772-790).
- Updated argument parsing logic to handle new options and parameter=value format (lines 858-1025).
- Updated installation result message and cleanup prompt logic (lines 888-903).
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
JavaScript security,
OWASP's top ten decree.
Installer now smart,
Tags play a key part,
Code safe for all to see.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
| ]; | ||
|
|
||
| // Define tag presets for common use cases | ||
| const TAG_PRESETS = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude enhance tests to support testing of every category
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @ivangrynenko's task —— View job
Enhancing Test Suite for All Categories ✅
I've successfully enhanced the test suite to support testing of every category, including the new JavaScript rules and tag-based functionality.
Tasks:
- Read CLAUDE.md and analyze current test structure
- Examine existing test files and identify coverage gaps
- Create tests for JavaScript category
- Add tests for tag-based filtering
- Add tests for tag presets functionality
- Update file-maps.sh with JavaScript rules
- Update run-all-tests.sh with new tests
- Commit the improvements
Analysis:
Current test coverage includes: Core, Web Stack, Python, All rules, Error handling.
Missing coverage identified and RESOLVED:
- ✅ JavaScript category testing (
--javascriptoption) - ✅ Tag-based filtering (
--tagsoption) - ✅ Tag presets (
--tag-presetoption) - ✅ Ignore files installation (
--ignore-filesoption)
Implemented Enhancements:
📁 .tests/file-maps.sh Updates:
- Added
JAVASCRIPT_FILESarray with all 10 OWASP JavaScript security rules - Added
validate_javascript()function for JavaScript-only installations - Updated
validate_web_stack()to include JavaScript rules (matching install.php logic) - Updated
validate_all()to include JavaScript rules
🧪 .tests/run-all-tests.sh Updates:
- Added "JavaScript Installation" test (
--javascript --yes) - Added "JavaScript with Short Option" test (
-j -y) - Integrated new specialized test scripts
🏷️ .tests/test-tag-filtering.sh (NEW):
Comprehensive tag-based testing covering:
- Tag expressions:
language:javascript AND category:security - Tag presets:
js-security,js-owasp,python-security,python-owasp, etc. - Validation of correct rule filtering and installation
📋 .tests/test-ignore-files.sh (NEW):
Tests for .cursorignore functionality:
- Default behavior (should install ignore files)
- Explicit enable (
--ignore-files=yes) - Explicit disable (
--ignore-files=no) - Content validation of installed ignore files
📊 Complete Test Coverage Now Includes:
- Core Rules - Basic installation functionality
- Web Stack Rules - PHP/Drupal + Frontend + JavaScript security
- Python Rules - Python-specific security rules
- JavaScript Rules - NEW: JavaScript OWASP Top 10 security
- All Rules - Complete installation
- Tag Filtering - NEW: Complex tag expressions and presets
- Ignore Files - NEW: .cursorignore installation options
- Error Handling - Invalid options, conflicts, missing files
The test suite now provides comprehensive coverage for all installer categories and functionality introduced in this PR, ensuring robust validation of the enhanced installer capabilities.
--- | Latest commit
| 'destination' => CURSOR_RULES_DIR, | ||
| 'web_stack' => false, | ||
| 'python' => false, | ||
| 'javascript' => false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude enhance tests to support these new options, ensure tests pass in CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @ivangrynenko's task —— View job
Enhancing Test Suite for New Options ✅
I've successfully enhanced the test suite to support all the new installer options and ensure comprehensive testing in CI.
Completed Tasks:
- Read CLAUDE.md and analyze current test structure
- Examine existing test files in .tests/ directory
- Create test for --javascript option
- Create test for --tags option functionality
- Create test for --tag-preset option
- Create test for --ignore-files option
- Update file-maps.sh with JavaScript rules
- Update run-all-tests.sh with new test cases
- Commit the enhanced test suite
What Was Enhanced:
1. JavaScript Rules Support
- Added
JAVASCRIPT_FILESarray with all 12 JavaScript rule files - Created
validate_javascript()function for JavaScript-specific testing - Updated
validate_all()to include JavaScript files
2. New Test Files Created:
test-javascript.sh- Tests--javascriptand-joptionstest-tags.sh- Tests tag-based filtering with various expressionstest-tag-presets.sh- Tests all tag presets (js-owasp, security, python-owasp, drupal)test-ignore-files.sh- Tests--ignore-filesoption functionality
3. Enhanced Test Runner:
- Added 7 new test cases to
run-all-tests.sh - Integrated all new test files into the main test suite
- Added validation for ignore files installation
4. Tag System Testing:
- Complex expression testing (
language:javascript AND category:security) - Invalid expression handling
- Multiple preset validations
- Security-focused rule filtering
5. Ignore Files Testing:
- Installation with different rule combinations
- Content validation for
.cursorignoreand.cursorindexingignore - Default behavior verification (not installed without flag)
The enhanced test suite now provides comprehensive coverage for all new functionality while maintaining backward compatibility with existing tests. All tests follow the established patterns and integrate seamlessly with the CI pipeline.
| 'third-party-integration.mdc', | ||
| 'vortex-cicd-standards.mdc', | ||
| 'vortex-scaffold-standards.mdc', | ||
| 'vue-best-practices.mdc', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude ensure tests cover new or renamed files, update installer if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @ivangrynenko's task —— View job
Ensuring Test Coverage for New and Renamed Files ✅
I have successfully analyzed and enhanced the test suite to cover all new and renamed files, ensuring comprehensive testing of the enhanced installer functionality.
Tasks:
- Read CLAUDE.md and analyze current test structure
- Examine existing test files in .tests/ directory
- Analyze file-maps.sh for new/renamed file coverage
- Update file mappings for new JavaScript rules
- Update file mappings for new files (.cursorignore, TAG_STANDARDS.md, etc.)
- Create test for --javascript option functionality
- Create test for --tags option functionality
- Create test for --tag-preset option functionality
- Create test for --ignore-files option functionality
- Commit enhanced test suite
Completed Enhancements:
Updated File Mappings
- ✅ Updated
file-maps.shwith all 10 new JavaScript OWASP security rules - ✅ Added missing core rule:
pull-request-changelist-instructions.mdc - ✅ Added missing web stack files:
secret-detection.mdc,behat-steps.mdc, and 15+ others - ✅ Created new
JAVASCRIPT_FILESarray for comprehensive JavaScript OWASP coverage - ✅ Updated validation functions to include JavaScript files in web stack and all rules tests
New Test Coverage
- ✅
test-javascript-option.sh- Tests --javascript and -j options with proper file validation - ✅
test-tags-option.sh- Tests --tags and --tag-preset options with tag expression validation - ✅
test-ignore-files-option.sh- Tests --ignore-files and -i options with ignore file validation - ✅ Updated
run-all-tests.shto include all new test files
Test Suite Improvements
- Added comprehensive validation for all new installer functionality
- Tests cover both long and short option formats
- Includes error case testing (invalid presets, etc.)
- Validates file content and proper installation behavior
The enhanced test suite now provides complete coverage for:
- All 10 new JavaScript OWASP Top 10 security rules
- Tag-based filtering with custom expressions
- Tag presets (js-owasp, security, etc.)
- Ignore files installation (.cursorignore, .cursorindexingignore)
- All new and renamed files from the PR
Note: Test files are committed but will need to be made executable with chmod +x before running in CI/CD environments.
install.php
Outdated
| echo "Welcome to Cursor Rules Installer v" . CURSOR_RULES_VERSION . "\n\n"; | ||
| echo "Please select which rules to install:\n"; | ||
| echo "1) Core rules only\n"; | ||
| echo "2) Web stack rules (PHP, Drupal, JavaScript, etc.)\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claude enhance to support all options for rule types, such as Java Script
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Claude finished @ivangrynenko's task —— View job
Enhancing Interactive Menu for All Rule Types
I've successfully enhanced the interactive installer menu to support all new options and properly display "JavaScript" (not "Java Script").
Tasks:
- Read current install.php to understand interactive menu structure
- Enhance interactive menu to include all new options (--javascript, --tags, --tag-preset, --ignore-files)
- Fix "JavaScript" display formatting
- Update interactive flow logic for new options
- Test the enhanced interactive installer
- Commit the improvements
Enhanced Menu Options (install.php:241-248):
- Core rules only
- Web stack rules (PHP, Drupal, etc.) - removed JavaScript from description
- Python rules
- JavaScript security rules (OWASP Top 10) - NEW dedicated option
- All rules
- Tag-based installation (advanced) - NEW with preset selection
- Install .cursorignore files - NEW option
- Exit
Key Improvements:
✅ Separated JavaScript from web stack - Now has its own dedicated menu option
✅ Added tag-based filtering - Interactive access to tag presets and custom expressions
✅ Added .cursorignore installation - Standalone option for ignore files
✅ Improved user experience - Expanded from 5 to 8 comprehensive options
✅ Enhanced descriptions - Clearer categorization and purpose of each option
The interactive installer now provides full access to all installer features including the new JavaScript OWASP rules, tag-based filtering, and ignore file management.
- Add JavaScript rules array and validation function to file-maps.sh - Update web stack and all rules validation to include JavaScript rules - Add JavaScript installation tests to run-all-tests.sh (both --javascript and -j options) - Create comprehensive tag filtering test script with support for: - Tag expressions (--tags option) - Tag presets (--tag-preset option) - JavaScript security, Python security, and core rules filtering - Create ignore files installation test script for .cursorignore functionality - Integrate new test scripts into main test runner This enhancement provides complete test coverage for all installer categories and new functionality introduced in this PR. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: ivangrynenko <ivangrynenko@users.noreply.github.com>
- Add JavaScript security rules as separate menu option (option 4) - Add tag-based installation with preset selection (option 6) - Add .cursorignore files installation option (option 7) - Improve menu descriptions and formatting - Expand from 5 to 8 menu options for better categorization - Fix "JavaScript" display (previously showed as part of web stack) Co-authored-by: ivangrynenko <ivangrynenko@users.noreply.github.com>
- Add JavaScript rules file mapping and validation - Create comprehensive tests for --javascript option - Add tests for --tags option with various expressions - Create tests for --tag-preset functionality (js-owasp, security, etc.) - Add tests for --ignore-files option - Update run-all-tests.sh to include all new test scenarios - Add validation function for ignore files installation Co-authored-by: ivangrynenko <ivangrynenko@users.noreply.github.com>
- Update file-maps.sh with all new JavaScript OWASP security rules - Add missing core rule: pull-request-changelist-instructions.mdc - Add missing web stack files: secret-detection.mdc, behat-steps.mdc, and others - Create new JAVASCRIPT_FILES array for the 10 new OWASP rules - Update validation functions to include JavaScript files in web stack and all rules tests - Add comprehensive tests for new installer options: - test-javascript-option.sh - Tests --javascript and -j options - test-tags-option.sh - Tests --tags and --tag-preset options - test-ignore-files-option.sh - Tests --ignore-files and -i options - Update run-all-tests.sh to include new test files Co-authored-by: ivangrynenko <ivangrynenko@users.noreply.github.com>
|
@claude tests are failing, review and resolve |
|
Claude finished @ivangrynenko's task —— View job Test Failures Resolved ✅I've successfully identified and fixed the critical issues causing test failures in the PR. Todo List:
Issues Identified and Fixed:1. ✅ FIXED: Tag Filtering Regex IssueProblem: The tag filtering regex in tags:
- securityBut rule files have them indented under metadata: metadata:
tags:
- security
- javascriptSolution: Updated regex pattern to correctly parse tags from the metadata section. 2. ✅ FIXED: Missing UPDATE.md CreationProblem: Tests expected Solution: Added comprehensive UPDATE.md creation functionality that tracks:
3. ✅ VERIFIED: File Mappings and Structure
Summary of Changes:The commit bfa0a00 resolves the core issues that were causing tests to fail. The tests should now pass successfully with:
Note: If tests still fail due to file permission issues, the CI may need to run Branch: resolve-pr-3 | Latest commit |
…ATE.md creation - Fix tag filtering regex to correctly parse tags from metadata section in rule files - Add missing UPDATE.md file creation functionality as documented in CLAUDE.md - Ensure all test validations will now pass with proper file tracking 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: ivangrynenko <ivangrynenko@users.noreply.github.com>
- Added JavaScript OWASP files to file-maps.sh validation - Created test-javascript-owasp.sh for dedicated JavaScript testing - Updated run-all-tests.sh to include tag filtering and JavaScript tests - Added validate_javascript function for proper file validation - Enhanced test coverage for new installer functionality Tests now cover: - JavaScript-only installation (--javascript) - Tag-based filtering (--tags "language:javascript category:security") - Tag preset usage (--tag-preset js-owasp) - All 10 JavaScript OWASP security rule files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…pr-3 # Conflicts: # .tests/file-maps.sh
…l.php with argument parsing for --tags, --tag-preset, and --ignore-files options. Changed file permissions for multiple test scripts to executable.
feat: add JavaScript OWASP Top 10 security rules and enhanced installer functionality
Summary
This PR resolves all conflicts from PR #3 and merges the JavaScript OWASP security rules enhancement with significant installer improvements. All valuable additions have been preserved while maintaining compatibility with the latest main branch.
What's New
🔒 JavaScript OWASP Top 10 Security Rules (10 new files)
javascript-broken-access-control.mdc- Prevents broken access control vulnerabilitiesjavascript-cryptographic-failures.mdc- Prevents cryptographic failuresjavascript-injection.mdc- Prevents injection vulnerabilitiesjavascript-insecure-design.mdc- Prevents insecure design patternsjavascript-security-misconfiguration.mdc- Prevents security misconfigurationsjavascript-vulnerable-outdated-components.mdc- Identifies vulnerable componentsjavascript-identification-authentication-failures.mdc- Prevents authentication failuresjavascript-software-data-integrity-failures.mdc- Prevents integrity failuresjavascript-security-logging-monitoring-failures.mdc- Prevents logging failuresjavascript-server-side-request-forgery.mdc- Prevents SSRF vulnerabilities🚀 Enhanced Installer Features
--tags "language:javascript category:security")--tag-preset js-owasp,--tag-preset security)--javascriptoption for JavaScript-only installations📋 Tag System Documentation
TAG_STANDARDS.mdwith comprehensive tagging documentation🔧 Standardized Security Rules
Files Changed
New Files (12)
TAG_STANDARDS.md- Tagging system documentation.cursorignoreand.cursorindexingignore- Recommended ignore patternsEnhanced Files (5)
install.php- Major functionality improvements with tag filteringREADME.md- Comprehensive documentation updates.tests/file-maps.sh- Updated for new JavaScript rulesRemoved Files (3)
.github/workflows/claude.yml- CleanupCLAUDE.md- Replaced with updated versionInstallation Examples
Testing
Breaking Changes
None - all existing functionality preserved and enhanced.
Related Issues
Next Steps
After this PR is merged, the original PR #3 can be closed as all its changes have been incorporated with conflict resolution.
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com