-
-
Notifications
You must be signed in to change notification settings - Fork 456
chore(943110): move to regex-assembly #4431
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
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
657bf96
chore(943110): move to regex-assembly
fzipi de2c92b
tests(943110): add extensive tests
fzipi 288a4b3
Merge branch 'main' into chore/move-regex-assembly-943110
fzipi 1d978d6
Merge branch 'main' into chore/move-regex-assembly-943110
fzipi 1166524
Apply suggestions from code review
fzipi cf63a3c
chore(formatting): auto fixes from pre-commit hooks
pre-commit-ci[bot] 9d254ae
fix: documentation comment formatting in 943110.ra
fzipi e361ef8
chore: remove Flask session ID documentation
fzipi 6bab210
chore(formatting): auto fixes from pre-commit hooks
pre-commit-ci[bot] c9b23eb
Apply suggestion from @fzipi
fzipi 4697e4e
chore(formatting): auto fixes from pre-commit hooks
pre-commit-ci[bot] 5ed550a
Merge branch 'main' into chore/move-regex-assembly-943110
fzipi 83b6667
Apply suggestion from @fzipi
fzipi 3b9b28a
Merge branch 'main' into chore/move-regex-assembly-943110
fzipi 001b02f
Merge branch 'main' into chore/move-regex-assembly-943110
fzipi b0a70af
Merge branch 'main' into chore/move-regex-assembly-943110
theseion File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| ##! Please refer to the documentation at | ||
| ##! https://coreruleset.org/docs/development/regex_assembly/. | ||
|
|
||
| ##! Rule 943110: Session Fixation - SessionID Parameter Names | ||
| ##! | ||
| ##! Description: Detects common session ID parameter names used in | ||
| ##! session fixation attacks. These are parameter names that appear in | ||
| ##! URLs or POST data that could be used to set session identifiers. | ||
| ##! | ||
| ##! Note: This rule uses t:lowercase transformation, so all patterns | ||
| ##! are in lowercase. | ||
| ##! | ||
| ##! Documentation: For each pattern, a comment documents the source / framework | ||
| ##! the pattern originates from, and any additional useful information. | ||
| ##!^ ^ | ||
| ##!$ $ | ||
|
|
||
| ##! Java/J2EE Session IDs | ||
| ##! Source: Java Servlet Specification | ||
| ##! Default: 'JSESSIONID' | ||
| jsessionid | ||
| ##! Source: Oracle Application Server / JServ | ||
| jservsession | ||
| ##! Source: IBM WebSphere / older J2EE servers | ||
| jwsession | ||
|
|
||
| ##! ASP/ASP.NET Session IDs | ||
| ##! Source: Microsoft IIS / Classic ASP | ||
| ##! Pattern: ASPSESSIONIDxxxxxxxx (where x is random chars) | ||
| aspsessionid | ||
| ##! Source: ASP.NET Framework | ||
| ##! Default: 'ASP.NET_SessionId' | ||
| asp\.net_sessionid | ||
|
|
||
| ##! PHP Session IDs | ||
| ##! Source: PHP session.name configuration | ||
| ##! Default: 'PHPSESSID' (already covered, phpsession/phpsessid are variants) | ||
| phpsession | ||
| phpsessid | ||
|
|
||
| ##! Oracle WebLogic | ||
| ##! Source: Oracle WebLogic Server documentation | ||
| ##! Default: 'JSESSIONID' for standard servlets, 'WLSession' for some configurations | ||
| ##! Note: 'weblogicsession' is a common variation | ||
| weblogicsession | ||
|
fzipi marked this conversation as resolved.
|
||
| wlsession | ||
|
|
||
| ##! Generic Session IDs (various platforms) | ||
| ##! Common generic session parameter names used across multiple frameworks | ||
| session_id | ||
| session-id | ||
| sessionid | ||
| _session_id | ||
|
|
||
| ##! ColdFusion Session IDs | ||
| ##! Source: Adobe ColdFusion / Lucee documentation | ||
| ##! CFID and CFTOKEN are used together to identify sessions | ||
| cfid | ||
| cftoken | ||
| cfsid | ||
|
|
||
| ##! Python/Flask Session IDs | ||
| ##! Source: Flask-Session extension | ||
| ##! Default: secure HTTP cookie named 'session', '_flask_session' for custom implementations | ||
|
fzipi marked this conversation as resolved.
|
||
| ##! The secure cookie 'session' is encrypted in the server, so it is not possible to have session fixation | ||
| _flask_session | ||
|
|
||
| ##! Node.js Session IDs | ||
| ##! Express session | ||
| ##! Source: https://github.com/expressjs/session | ||
| ##! Default: 'connect.sid' (when using express-session/connect) | ||
| connect\.sid | ||
| ##! Sails.js | ||
| ##! Source: https://sailsjs.com/documentation/reference/configuration/sails-config-session | ||
| ##! Default: 'sails.sid' | ||
| sails\.sid | ||
|
|
||
| ##! Node.js Framework Session IDs | ||
| ##! Koa.js | ||
| ##! Source: https://github.com/koajs/session | ||
| ##! Default: 'koa.sess' or 'koa:sess' depending on configuration | ||
| koa\.sess | ||
| koa:sess | ||
|
|
||
| ##! Next.js / NextAuth.js | ||
| ##! Source: https://next-auth.js.org/configuration/options#cookies | ||
| ##! Default cookie names for NextAuth.js session tokens | ||
| next-auth\.session-token | ||
| __secure-next-auth\.session-token | ||
| __host-next-auth\.session-token | ||
|
|
||
| ##! Meteor | ||
| ##! Source: Meteor Accounts system | ||
| ##! Default: 'meteor_login_token' (localStorage and cookie) | ||
| meteor_login_token | ||
|
|
||
| ##! Ruby/Rails Session IDs | ||
| ##! Rails | ||
| ##! Source: Ruby on Rails ActionDispatch::Session | ||
| ##! Default: '_<app_name>_session', commonly '_rails_session' | ||
| _rails_session | ||
| ##! Rack | ||
| ##! Source: Rack session middleware | ||
| ##! Default: 'rack.session' | ||
| rack\.session | ||
|
|
||
| ##! Python Framework Session IDs | ||
| ##! Django | ||
| ##! Source: https://docs.djangoproject.com/en/stable/topics/http/sessions/ | ||
| ##! Default: 'sessionid' (already covered in generic section) | ||
|
|
||
| ##! Java Framework Session IDs | ||
| ##! Play Framework | ||
| ##! Source: https://www.playframework.com/documentation/latest/SettingsSession | ||
| ##! Default: 'PLAY_SESSION' | ||
| play_session | ||
|
|
||
| ##! PHP Framework Session IDs | ||
| ##! Laravel | ||
| ##! Source: https://github.com/laravel/framework - config/session.php | ||
| ##! Default: 'laravel_session' | ||
| laravel_session | ||
|
|
||
| ##! CakePHP | ||
| ##! Source: https://book.cakephp.org/3.x/development/sessions.html | ||
| ##! CakePHP 3.x default: 'CAKEPHP' | ||
| ##! Source: https://book.cakephp.org/4.x/development/sessions.html | ||
| ##! CakePHP 4.x default: Uses PHP's session.name (typically 'PHPSESSID') | ||
| cakephp | ||
|
|
||
| ##! CodeIgniter | ||
| ##! Source: https://codeigniter.com/user_guide/libraries/sessions.html | ||
| ##! Default: 'ci_session' | ||
| ci_session | ||
|
|
||
| ##! Zend | ||
| ##! Default session ID parameter name | ||
| zend_session_id | ||
|
|
||
| ##! Other Framework Session IDs | ||
|
|
||
| ##! Shiny (R) | ||
| ##! Source: RStudio Shiny Server | ||
| ##! Authentication token used by Shiny applications | ||
| shiny-token | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.