Skip to content
  • Samuel (WMF)'s avatar
    4b14bec3
    Improved heuristics for detecting TPRs in gadet code · 4b14bec3
    Samuel (WMF) authored and SBassett's avatar SBassett committed
    * Add cache functionality to avoid unecessary API calls
    
    * Improved heuristics for detecting TPRs in gadet code
    
    Reduce false positives by combining a few conditions:
    - Single-line or multiple comments are ignored during code scan
    - Gadget code contains some URLs that aren't part of the allow-list
    - Gadget code matches abritrary rules such as the presence of `mw.loader` or `iframe`.
    
    Still, some gadgets won't be caught if they load TPRs in a way that evades those rules.
    
    Bug: T335892
    4b14bec3
    Improved heuristics for detecting TPRs in gadet code
    Samuel (WMF) authored and SBassett's avatar SBassett committed
    * Add cache functionality to avoid unecessary API calls
    
    * Improved heuristics for detecting TPRs in gadet code
    
    Reduce false positives by combining a few conditions:
    - Single-line or multiple comments are ignored during code scan
    - Gadget code contains some URLs that aren't part of the allow-list
    - Gadget code matches abritrary rules such as the presence of `mw.loader` or `iframe`.
    
    Still, some gadgets won't be caught if they load TPRs in a way that evades those rules.
    
    Bug: T335892
Loading