Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 2.27 KB

File metadata and controls

72 lines (53 loc) · 2.27 KB

AGENTS.md

This file contains guidance for AI coding assistants working on this project.

Project Overview

A collection of Java clients to access various vulnerability data sources available on the internet, including:

  • NVD (National Vulnerability Database)
  • GitHub Security Advisory Database
  • EPSS (Exploit Prediction Scoring System)
  • CISA Known Exploited Vulnerabilities Catalog

Build & Development Commands

Build

./gradlew build

This runs the full build including compilation, tests, and Spotless code formatting checks.

Test

./gradlew test

Code Formatting

./gradlew spotlessApply

Automatically formats code to match the project's Spotless configuration.

Note: The build command includes Spotless checks, so code must be properly formatted to pass the build. When writing or modifying code, prefer following the existing coding style standards rather than running spotlessApply.

Code Quality

./gradlew spotbugsMain

Runs SpotBugs static analysis.

Code Style Guidelines

  • Java Version: Java 11 (source and target compatibility)
  • Formatting: Code formatting is enforced via Spotless using Eclipse formatter configuration at src/main/config/spotless.eclipseformat.xml
  • License Headers: All Java files must include the license header defined in src/main/config/java.license
  • Follow existing patterns: When modifying code, match the style and patterns used in surrounding code

Project Structure

  • src/main/java/ - Main source code
    • Client implementations for various vulnerability data sources
  • src/test/java/ - Test code
  • src/main/resources/ - Resource files including Mustache templates for GraphQL queries
  • src/main/config/ - Configuration files for code quality tools (Spotless, SpotBugs)

Dependencies

Key dependencies:

  • Apache HttpClient 5 (HTTP client with caching)
  • Jackson (JSON processing)
  • JMustache (templating for GraphQL queries)
  • JUnit 5 (testing)
  • SpotBugs annotations (static analysis)

Testing

  • Uses JUnit 5 (Jupiter)
  • Run tests with ./gradlew test
  • Some tests may require API keys (e.g., GITHUB_TOKEN environment variable)

Publishing

This project publishes to Maven Central. Publishing tasks are configured but must only be run by maintainers.