Skip to content

Conversation

@ahmed-farid-dev
Copy link
Contributor

This PR add a new experimental query that looks for misconfigured CORS headers in tomcat config file
These types of issues are classified under CWE-346: Origin Validation Error
The query finds the following:

  • Access-Control-Allow-Origin being set to '*' along with Access-Control-Allow-Credentials set to true.

Do let me know if any feedback required to merge the PR

henrymercer and others added 25 commits February 1, 2022 15:39
Ruby: Add File.open as a FileSystemAccess
Add a rust-toolchain file to the Ruby directory, which instructs Rustup
to install a specific version of Rust (1.54). This will be used in CI,
so any use of language features or dependencies that don't support 1.54
will result in a CI failure.

This should ensure we have a documented minimum supported rust version
and an easy to way to update it in the future (update the rust-toolchain
file).
This ensures that if we change our Rust version, the caches will be
invalidated.
…el-building-pack

JS: Add model building pack for ML-powered queries
Add `Route` classes which model Rails routing information, typically
defined in a `routes.rb` file. We extract only the most basic
information: HTTP method, path, controller and action. This is enough to
determine whether a given controller method is a route handler, and what
HTTP method it handles, which is useful for, among other things, the URL
redirect query.
Handlers for non-GET requests aren't vulnerable to URL redirect attacks,
because browsers won't initiate non-GET requests when you click a link.

We can use Rails routing information, if present, to filter out any
handlers for non-GET requests.
This predicate isn't used.
This shows how the predicate behaves, as well as a case where it goes
wrong.
Any classes/predicates not used externally or in tests are now private.
Also fix some typos.
This version is much shorter and hopefully performs a bit better.
RasmusWL and others added 4 commits February 9, 2022 13:42
Misc: Streamline `consistency-queries/qlpack.yml`
So they follow the same format as the other languages.

`git grep codeql-ql` in the ql/ subfolder does not yield any results
now.
@ahmed-farid-dev ahmed-farid-dev marked this pull request as draft February 9, 2022 14:54
@ahmed-farid-dev ahmed-farid-dev marked this pull request as ready for review February 9, 2022 14:54
@ahmed-farid-dev ahmed-farid-dev requested a review from a team as a code owner February 10, 2022 20:39
@ahmed-farid-dev ahmed-farid-dev requested a review from a team February 10, 2022 20:39
@ahmed-farid-dev ahmed-farid-dev requested review from a team as code owners February 10, 2022 20:39
@ahmed-farid-dev ahmed-farid-dev deleted the tomcat-cors-misconfig branch February 14, 2022 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.