https://github.com/chains-project/classport
Passports for Java class files
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 4 committers (25.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.7%) to scientific vocabulary
Repository
Passports for Java class files
Basic Info
- Host: GitHub
- Owner: chains-project
- License: mit
- Language: Java
- Default Branch: main
- Size: 4.48 MB
Statistics
- Stars: 2
- Watchers: 7
- Forks: 1
- Open Issues: 16
- Releases: 0
Metadata Files
README.md

[](LICENSE)
Classport
Classport is a passport for Java classes.
It is a JVM instrumentation agent and Maven plugin that embeds and retrieves dependency metadata (GAV: Group, Artifact, Version) directly from Java .class files. It enables runtime introspection of runtime dependencies in Java.
🎯 Motivation
Java applications often rely on third-party libraries via Maven, but all dependency metadata is lost once the application is packaged and deployed. This creates blind spots for: - Vulnerability scanners - Runtime permission enforcement
🧩 Classport solves this by preserving dependency origin metadata all the way to runtime.
🚀 Key Features
- 🔍 Embeds Maven GAV coordinates as runtime-visible annotations into compiled
.classfiles. - 🎯 Retrieves this metadata at runtime using a lightweight Java agent.
- 🧪 Compatible with real-world projects and benchmarks (see
classport-experiments).
⚙️ How It Works
Classport has two components:
| Component | Description |
|--------------|-------------|
| 🧵 Embedder | A Maven plugin that injects GAV metadata as Java annotations into every .class file. |
| 🕵️ Introspector | A Java agent that dynamically inspects dependencies at runtime to retrieve their GAV info. |

🛠️ Getting Started
Requirements
- Java 17+
- Maven 3.8+
Setup
Clone and install the project.
bash
git clone git@github.com:chains-project/classport.git
cd classport
mvn clean install -DskipTests
How to use
In order to achieve runtime dependencies introspection with classport, you have to first embedd and then to run the instrospector together with you application.
Embed Inside the target project folder.
bash mvn compile io.github.project:classport-maven-plugin:0.1.0-SNAPSHOT:embed mvn package -Dmaven.repo.local=classport-files -DskipTestsNote: if the project has more than one module, it is required to merge all theclassport-filesfolders and use this as a Maven local repo during the packaging phase.Introspect
bash java -javaagent:<path-to-classport-agent-jar>=<name-of-the-project>,<path-to-output-dir>,dependency -jar <path-to-jar-of-the-target-app> [optional-args-of-the-target-app]Note:name-of-the-projectcan be any name and it is used to build the name of the output file.path-to-output-dirmust be a path of an existing folder
Example of usage
Run the following command from the root folder of Classport
```bash cd resources/simple-app-monitoring mvn clean
Embed
mvn compile io.github.project:classport-maven-plugin:0.1.0-SNAPSHOT:embed mvn package -Dmaven.repo.local=classport-files -DskipTests
Introspect
mkdir output java -javaagent:../../classport-instr-agent/target/classport-instr-agent-0.1.0-SNAPSHOT.jar=test,./output,dependency -jar target/test-agent-app-1.0-SNAPSHOT.jar ``` In the output folder there will be the csv file with the resulting detected runtime dependencies.
This is the expected output.
group,artefact,version
org.apache.commons,commons-lang3,3.17.0
com.example,test-agent-app,1.0-SNAPSHOT
Owner
- Name: CHAINS research project at KTH Royal Institute of Technology
- Login: chains-project
- Kind: organization
- Website: https://chains.proj.kth.se
- Repositories: 9
- Profile: https://github.com/chains-project
"Consistent Hardening and Analysis of Software Supply Chains" at KTH, funded by SSF
GitHub Events
Total
- Issues event: 15
- Watch event: 1
- Delete event: 9
- Issue comment event: 18
- Push event: 119
- Pull request review event: 20
- Pull request review comment event: 26
- Pull request event: 19
- Fork event: 1
- Create event: 11
Last Year
- Issues event: 15
- Watch event: 1
- Delete event: 9
- Issue comment event: 18
- Push event: 119
- Pull request review event: 20
- Pull request review comment event: 26
- Pull request event: 19
- Fork event: 1
- Create event: 11
Committers
Last synced: over 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Daniel Williams | d****i@k****e | 71 |
| Serena Cofano | 5****o | 4 |
| Aman Sharma | m****0@g****m | 3 |
| Martin Monperrus | m****s@g****g | 1 |
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 21
- Total pull requests: 12
- Average time to close issues: 2 months
- Average time to close pull requests: 7 days
- Total issue authors: 4
- Total pull request authors: 2
- Average comments per issue: 0.52
- Average comments per pull request: 1.08
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 12
- Pull requests: 12
- Average time to close issues: 4 days
- Average time to close pull requests: 7 days
- Issue authors: 3
- Pull request authors: 2
- Average comments per issue: 0.42
- Average comments per pull request: 1.08
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- danielwis (8)
- serenacofano (7)
- algomaster99 (4)
- monperrus (2)
Pull Request Authors
- serenacofano (9)
- algomaster99 (7)
- monperrus (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- org.apache.maven.plugin-tools:maven-plugin-annotations 3.8.1 provided
- org.apache.maven:maven-plugin-api 3.9.0 provided
- org.apache.maven:maven-project 2.2.1 provided
- org.ow2.asm:asm 9.6
- org.ow2.asm:asm-commons 9.6
- org.ow2.asm:asm-tree 9.6
- org.ow2.asm:asm-util 9.6
- junit:junit 3.8.1 test
- org.ow2.asm:asm 9.6
- org.ow2.asm:asm-commons 9.6
- org.ow2.asm:asm-tree 9.6
- org.ow2.asm:asm-util 9.6
- tld.domain.me:classport-commons 0.1.0-SNAPSHOT
- org.apache.maven.plugin-tools:maven-plugin-annotations 3.8.1 provided
- org.apache.maven:maven-plugin-api 3.9.0 provided
- org.apache.maven:maven-project 2.2.1 provided
- org.ow2.asm:asm 9.6
- org.ow2.asm:asm-commons 9.6
- org.ow2.asm:asm-tree 9.6
- org.ow2.asm:asm-util 9.6
- tld.domain.me:classport-commons 0.1.0-SNAPSHOT
- junit:junit 3.8.1 test
- io.github.chains-project:classport-commons 0.1.0-SNAPSHOT
- org.ow2.asm:asm 9.6
- org.ow2.asm:asm-commons 9.6
- org.ow2.asm:asm-tree 9.6
- org.ow2.asm:asm-util 9.6