Skip to content

JS: Add StoredXss and XssThroughDom to ATM extraction queries #8857

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

Closed
wants to merge 8 commits into from

Conversation

TomBolton
Copy link
Contributor

@TomBolton TomBolton commented Apr 25, 2022

  • Add StoredXss and XssThroughDom to ATM extraction queries
  • Update the expected test output with the two new queries
  • Explicitly name each individual security query to include in the ATM query pack
  • Update the acronyms in the class names to use camel case to address the code scanning warnings

esbena and others added 4 commits April 22, 2022 14:28
Produced with:
```
javascript/ql$tb boost src/Security/CWE-079/StoredXss.ql XssSink
javascript/ql$ tb boost src/Security/CWE-079/XssThroughDom.ql XssSink
```
@github-actions github-actions bot added the JS label Apr 25, 2022
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 8 vulnerabilities.

@@ -16,8 +16,10 @@
import experimental.adaptivethreatmodeling.FilteringReasons
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.SqlInjectionATM as SqlInjectionATM
import experimental.adaptivethreatmodeling.StoredXssATM as StoredXssATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
@@ -16,8 +16,10 @@
import experimental.adaptivethreatmodeling.FilteringReasons
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.SqlInjectionATM as SqlInjectionATM
import experimental.adaptivethreatmodeling.StoredXssATM as StoredXssATM
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM
import experimental.adaptivethreatmodeling.XssThroughDomATM as XssThroughDomATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
@@ -7,7 +7,9 @@
import experimental.adaptivethreatmodeling.SqlInjectionATM as SqlInjectionATM
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM
import experimental.adaptivethreatmodeling.StoredXssATM as StoredXssATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
import experimental.adaptivethreatmodeling.NosqlInjectionATM as NosqlInjectionATM
import experimental.adaptivethreatmodeling.TaintedPathATM as TaintedPathATM
import experimental.adaptivethreatmodeling.XssATM as XssATM
import experimental.adaptivethreatmodeling.StoredXssATM as StoredXssATM
import experimental.adaptivethreatmodeling.XssThroughDomATM as XssThroughDomATM

Check warning

Code scanning / CodeQL

Acronyms should be PascalCase/camelCase.

Acronyms should be PascalCase/camelCase
@TomBolton TomBolton changed the title Add StoredXss and XssThroughDom to ATM extraction queries JS: Add StoredXss and XssThroughDom to ATM extraction queries Apr 26, 2022
@TomBolton
Copy link
Contributor Author

Copying Henry's comment from a previous PR:

Update these to line up with the existing queries like XssAtm.ql:

Use an alert message like "(Experimental) This may be a cross-site scripting vulnerability due to $@. Identified using machine learning.", which doesn't include the score.
Use "experimental" instead of "boosted" in the query name
Use an @id like js/ml-powered/
Remove experimental/atm from the tags
Rename ATM -> Atm

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 100 vulnerabilities.

@TomBolton TomBolton force-pushed the tombolton/add-new-queries branch from 112855f to 59d579c Compare April 26, 2022 11:45
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

Found 10 vulnerabilities.

@TomBolton TomBolton force-pushed the tombolton/add-new-queries branch from 59d579c to 08678a9 Compare April 26, 2022 13:03
@TomBolton
Copy link
Contributor Author

Closing as the experimentation with renaming ATM -> Atm did not work as intended.

@TomBolton TomBolton closed this Apr 26, 2022
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.

2 participants