owasp-java-encoder

Contextual output encoding for Java 8+: HTML, JavaScript, CSS, XML and URI components. Zero-dependency core with optional JSP and Jakarta adapters

A new way for AI to search for data
View on GitHub
548GitHub stars
276commits on main
130forks
v1.6.0latest release, 2026-10-18

Java 88.5%, Python 11.5%, HTML 0%, CSS 0% · created 2015-03-30 · last push 2026-10-26

What XERJ indexed

Snapshot

179 files · 971.5 KB

Only core/src/main/java/org/owasp/encoder, jakarta/src/main/resources/META-INF, jsp/src/main/resources/META-INF at commit 68536fb4e3 (2026-09-25). main is 137 commits ahead.

Selected work

Volodymyr Borysenko
@VolodymyrLinuxovich

“Clarify forJson HTML context documentation”. 5 files, 219 lines in jakarta, jsp, core/src.

Licence

The repository

BSD-3-Clause

LICENSE file checked at the pinned commit; the author agreed to inclusion.

The XERJ corpus

BSD-3-Clause, with credit

The author agreed by email on 2026-10-12. Same terms as the repository. Answers name the repo, the commit and the file:line.

selected for the XERJ Corpus Hublicence clearedsuggested use: adapt with attribution

xssjavacsshtmljakartajavascriptjspoutput-encoding

Example questions

Inside the indexed corpus

Licence on GitHub and in the corpus

GitHub reported BSD-3-Clause for OWASP/owasp-java-encoder on 2026-10-31, and the LICENSE file at commit 68536fb4e3 was reviewed as BSD-3-Clause. They match, so answers from this corpus carry the same terms as the live repository.

Contributors

Volodymyr Borysenko (@VolodymyrLinuxovich) has 1 selected repository on the hub.

Using XERJ with owasp-java-encoder

The prompt

Paste it into your AI agent. It clones OWASP/owasp-java-encoder at the pinned commit and indexes it on your machine.

Search the GitHub repository OWASP/owasp-java-encoder with XERJ (https://hub.xerj.org/corpus/owasp--owasp-java-encoder).
Run these in a shell, in order, and check each result before the next:
1. xerj --help  (success: it prints usage). If xerj is missing: curl -fsSL https://xerj.org/get | sh
2. git clone https://github.com/OWASP/owasp-java-encoder owasp-java-encoder && git -C owasp-java-encoder checkout 68536fb4e3f13cdf5ad052929a4328c5171d1f46
3. Start a local node and leave it running: xerj --insecure --data-dir ./xerj-data
4. xerj autoindex ./owasp-java-encoder --url http://127.0.0.1:9200 --prefix owasp-java-encoder --progress plain
5. xerj autoindex map --url http://127.0.0.1:9200
Then answer my question from the indexed files and cite the ax_path of every hit. Query syntax: https://xerj.org/llms.txt
Licence: BSD-3-Clause. Keep the copyright notice and credit the authors.

Related

Stats: GitHub API, fetched 2026-10-31. Snapshot: the git tree at the pinned commit. Selected work and consent: the XERJ registry.