All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.shiftleft.semanticcpg.language.android.LocalTraversal.scala Maven / Gradle / Ivy

There is a newer version: 4.0.131
Show newest version
package io.shiftleft.semanticcpg.language.android

import io.shiftleft.codepropertygraph.generated.nodes.Local
import io.shiftleft.semanticcpg.language.*

class LocalTraversal(val traversal: Iterator[Local]) extends AnyVal {
  def callsEnableJS =
    traversal
      .where(
        _.referencingIdentifiers.inCall
          .nameExact("getSettings")
          .where(
            _.inCall
              .nameExact("setJavaScriptEnabled")
              .argument
              .isLiteral
              .codeExact("true")
          )
      )

  def loadUrlCalls =
    traversal.referencingIdentifiers.inCall.nameExact("loadUrl")

  def addJavascriptInterfaceCalls =
    traversal.referencingIdentifiers.inCall.nameExact("addJavascriptInterface")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy