Skip to content

A Java compiler plugin aiming at finding possible network requests in Java and Android apps.

License

Notifications You must be signed in to change notification settings

vehiloco/network-request-checker

Repository files navigation

Network Request Checker

Build Status

A Java compiler plugin aiming at finding possible network requests in Java and Android apps.

Build

To build the Network Request Checker (In the root directory of the checker):

./gradlew build

Quick Start

The Network Request Checker can work with multiple build tools, here we provide a quick start with javac command.

./gradlew assemble copyDependencies

javac -cp ./build/libs/checker.jar:./build/libs/network-request-checker.jar \
-processor org.checkerframework.checker.networkrequest.NetworkRequestChecker \
tests/networkrequest/UrlTest.java

The expected output will be something like:

tests/networkrequest/UrlTest.java:8: error: [network.request.found] Found possible network request: URL: https://urltest.com
        URL url1 = new URL("https://urltest.com");
                   ^
tests/networkrequest/UrlTest.java:10: error: [network.request.found] Found possible network request: PROTOCOL: http | HOST: example.com | PORT: 80 | FILE: pages/page1.html
        URL url2 = new URL("http", "example.com", 80, "pages/page1.html");
                   ^
tests/networkrequest/UrlTest.java:14: error: [network.request.found] Found possible network request: URL: unrecognized
        URL url3 = new URL(url);
                   ^
3 errors

Development notes

When updating the Checker Framework version, make sure to use the same version across all build.gradle files.

Run ./gradlew :spotlessApply to reformat the source code.

About

A Java compiler plugin aiming at finding possible network requests in Java and Android apps.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •