Sitelet https://web.archive.org/web/20221123051713/https://github.com/github/codeql/pull/11333
Skip to content
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

ATM: add XSSThroughDOM boosted query #11333

Draft
wants to merge 12 commits into
base: tiferet/simplify-configs
Choose a base branch
from

Conversation

tiferet
Copy link
Contributor

@tiferet tiferet commented Nov 18, 2022

No description provided.

@tiferet tiferet changed the base branch from jhelie/add-xss-through-dom to main Nov 18, 2022
@tiferet tiferet changed the base branch from main to tiferet/simplify-configs Nov 18, 2022
@tiferet tiferet changed the title Tiferet/add xss through dom ATM: add XSSThroughDOM boosted query Nov 18, 2022
tiferet added 2 commits Nov 19, 2022
`isOtherModeledArgument` and `isArgumentToBuiltinFunction` contained the old logic for selecting negative endpoints for training.

These can now be deleted, and replaced by a single base class that collects all EndpointCharacteristics that are currently used to indicate negative training samples: `OtherModeledArgumentCharacteristic`.

This in turn lets us delete code from `StandardEndpointFilters` that effectively said that endpoints that are high-confidence non-sinks shouldn't be scored at inference time, either.
tiferet added 7 commits Nov 19, 2022
All remaining functionality in `CoreKnowledge` is only being used in `EndpointCharacteristics`, so it can be moved there as a small set of helper predicates.
All remaining functionality in `StandardEndpointFilters` is only being used in `EndpointCharacteristics`, so it can be moved there as a small set of helper predicates.
That way the specific configs which inherit from `AtmConfig` also inherit from `TaintTracking::Configuration`.

This removes the need for two separate config classes for each query.
A long as we're not boosting sources, `isSource` is identical to `isKnownSource`.
Holds if `sink` is a known taint sink or an "effective" sink.
Define the query for finding ATM alerts in the base class `AtmConfig`, and call it from each query's .ql file.
@tiferet tiferet force-pushed the tiferet/simplify-configs branch from a543d95 to d8ef142 Compare Nov 19, 2022
@tiferet tiferet force-pushed the tiferet/add-xss-through-dom branch from ea21dd9 to d79b35b Compare Nov 19, 2022
private import semmle.javascript.security.dataflow.UnsafeJQueryPluginCustomizations::UnsafeJQueryPlugin as UnsafeJQuery
import AdaptiveThreatModeling

class Configuration extends AtmConfig {
Copy link
Contributor

@jhelie jhelie Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the refactoring in the previous PR essentially merge the TaintTracking::Configuration with the AtmConfig ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants