Provides custom lint rules developed by Bottle Rocket Studios to help keep our code cleaner

Overview

Release

CustomLintRules

What this library does?

This library currently provides the following lint rules that detect unsupported characters in source and xml files:

  • TrojanSourceDetector - covers Java and Kotlin files
  • TrojanXmlDetector - covers XML resource and Android manifest files

A fatal lint error will be reported if any unicode (or unsupported ascii) characters are detected. Only printable(32..126) + horizontal tab/line feed/carriage return(9, 10, 13) ascii characters are allowed.

Usage

  1. Add jitpack in your root build gradle at the end of allprojects.repositories. Jitpack recommends adding to the end as Gradle will go through all repositories in order until it finds a dependency and jitpack likely accounts for a small portion of dependencies in your project:
allprojects {
    repositories {
        // ...
        maven(url = "https://jitpack.io")
    }
}
  1. Add the following to all your module build gradle files where you want to use the lint rules:
dependencies {
    // ...
    implementation("com.github.BottleRocketStudios:Android-CustomLintRules:1.0.0")
    // ...
}
  1. Perform a gradle sync and run the lint gradle task (gradlew lint). Any problems detected by the custom lint rules will be shown in the generated lint report.

Sample characters that will cause a lint error

Sample Lint Reports

View of the html lint report (generated via gradlew lint on your project)

a

Sample TrojanSource Lint Failure

a

Sample TrojanXml Lint Failure

a

Links

Details of the Trojan Source attack

Ascii reference

Build

Project structure

  • sample - Sample project containing source code and xml that will trigger the custom lint rules.
  • library - Android library project that packages up the lintRules into the library aar.
  • lintRules - actual source of the lint rules (with tests).

General

jitpack development/SNAPSHOT builds

  • Access development/SNAPSHOT builds by replacing the version with an arbitrary release tag, commit hash, or branch~name-SNAPSHOT (ex: develop-SNAPSHOT, feature~abc-SNAPSHOT). You can also browse https://jitpack.io/#BottleRocketStudios/Android-CustomLintRules to generate a dependency value from a list of all jitpack builds.
  • When debugging, you can view artifacts that gradle downloads to your local machine (from a consumer app POV) by navigating to the following folder and viewing its contents to inspect aars, module files, and pom files:
    • ~/.gradle/caches/modules-2/files-2.1/com.github.BottleRocketStudios/Android-CustomLintRules/

Local aar generation

  • You can generate a locally built aar for testing by executing the publishReleasePublicationToMavenLocal Run Configuration.
  • Quickly navigate to the output by executing the Open Local Maven Publication Folder Run Configuration.

Building custom lint rules links

You might also like...
SharedPreference Library to save all types including your custom types and observe them if need be.

A SharedPreference Library that can be used to store all types including your custom classes and observe them too if needed.

Runtime code generation for the Java virtual machine.
Runtime code generation for the Java virtual machine.

Byte Buddy runtime code generation for the Java virtual machine Byte Buddy is a code generation and manipulation library for creating and modifying Ja

iTunes 11-style color matching code for Android
iTunes 11-style color matching code for Android

##About ColorArt is a library that uses an image to create a themed image/text display. It's a port of the idea found on the Panic Blog to work on And

A small library which will save you from writing the same intent creation code again and again for the most simple tasks

Android Intents A small library which will save you from writing the same intent creation code again and again for the most simple tasks. I found myse

Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platform the code is running.

Trail Trail is a simple logging system for Java and Android. Create logs using the same API and the library will detect automatically in which platfor

recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.
recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.

recompose is a tool for converting Android layouts in XML to Kotlin code using Jetpack Compose.

Polytech computer graphics couerse code scam script
Polytech computer graphics couerse code scam script

Js-code-parser Polytech computer graphics couerse code scam script Копируйте строку скрипта с дебаггера с странички лабы. Вставляйте в файлик test.txt

SoLoader is a native code loader for Android.

SoLoader is a native code loader for Android. It takes care of unpacking your native libraries and recursively loads dependencies on platforms that don't support that out of the box.

A low intrusive, configurable android library that converts layout XML files into Java code to improve performance

qxml English 一个低侵入,可配置的 Android 库,用于将 layout xml 文件转换为 Java 代码以提高性能。 与X2C的对比 X2C: 使用注解处理器生成View类,使用时需要在类中添加注解,并替换setContentView方法,侵入性较强; 对于布局属性的支持不够完美

Releases(1.0.0)
Owner
Bottle Rocket Studios
Bottle Rocket Studios
Matches incoming and/or outgoing text messages against set rules and sends them over to webhook.

Textmatic If you ever wanted a tool to simply push the SMS (or text messages) from your phone to somewhere remote, this is it. This app matches all in

Float 2 Jan 7, 2022
React Native wrapper to bridge our iOS and Android SDK

React Native wrapper to bridge our iOS and Android SDK

Intercom 94 Jan 1, 2023
Keep data as a linked list on disk. A alternative way to reduce redundant operation for DiskLruCache

DiskLinkedList Keep data as a linked list on disk. An alternative way to reduce redundant operation for DiskLruCache Use-case Android have build-in Di

Cuong V. Nguyen 6 Oct 29, 2021
A Telegram bot utilities that help to reduce the code amount

Flume Party A Telegram bot utilities that help to reduce code amount. Real project examples Pull Party Bot: 19% of code has been reduced. Resistance B

pool party 1 Jun 8, 2022
BinGait is a tool to disassemble and view java class files, developed by BinClub.

BinGait Tool to diassemble java class files created by x4e. Usage To run BinGait, run java -jar target/bingait-shadow.jar and BinGait will launch. If

null 18 Jul 7, 2022
Small Android library to help you incorporate MVP, Passive View and Presentation Model patterns in your app

DroidMVP About DroidMVP is a small Android library to help you incorporate the MVP pattern along with Passive View and Presentation Model (yes, those

Andrzej Chmielewski 225 Nov 29, 2022
Simple project to help people track their crusade progress

Crusade-helper Simple project to help people track their crusade progress Core module Contains: model - package with all database structure service -

null 4 Nov 2, 2021
A command line utility to help you investigate the sensitive data associated with Macie findings.

Macie Finding Data Reveal This project contains a command line utility to help you investigate the sensitive data associated with Macie findings.

AWS Samples 8 Nov 16, 2022
A logger with a small, extensible API which provides utility on top of Android's normal Log class.

This is a logger with a small, extensible API which provides utility on top of Android's normal Log class. I copy this class into all the little apps

Jake Wharton 9.8k Dec 30, 2022