Skip to content

Plugins

Static software catalogs often suffer from a common problem: they become stale. While high-level metadata like ownership or lifecycle status changes slowly, technical details—such as deployed versions, API schemas, or build artifacts—evolve rapidly. Manually updating this information is impractical and error-prone.

Plugins in swcat solve this by automating the retrieval of dynamic information. They bridge the gap between your static catalog definitions and the living reality of your infrastructure.

Concept

The plugin architecture enables a powerful data-enrichment loop:

  1. Fetch: A plugin connects to an external source (e.g., a CI/CD pipeline, an artifact repository, or a cloud provider) based on an entity's identity.
  2. Enrich: The plugin extracts relevant data and attaches it to the entity as annotations.
  3. Visualize: You use Custom Content to render these annotations directly in the swcat UI, transforming raw data into useful insights (tables, links, or status indicators).

Configuration

Plugins are configured in the plugins.yml file. Each plugin definition includes:

  • Kind: The type of plugin implementation (e.g., AsyncAPIImporterPlugin).
  • Trigger: A query predicate that determines which entities the plugin supports.
  • Inhibit: An optional predicate to prevent the plugin from running even if the trigger matches.
  • Spec: Plugin-specific configuration settings.

Variable Expansion

The plugins.yml file supports environment variable expansion using the ${VAR} or ${VAR:-default} syntax. This is particularly useful for sensitive information (like API keys) or environment-specific settings.

plugins:
  jfrog-sbom:
    kind: JFrogXrayPlugin
    # ...
    spec:
      jfrogUrl: ${JFROG_URL:-https://artifactory.example.com}
      auth:
        mavenServerId: ${JFROG_SERVER_ID}

Example plugins.yml

plugins:
  asyncApiImporter:
    kind: AsyncAPIImporterPlugin
    trigger: "kind:API AND type~'^kafka/'"
    # ...
    spec:
      targetAnnotation: asyncapi.com/channels

Execution

When a plugin's trigger matches an entity, a "zap" (lightning bolt) icon appears on the entity's detail page in the swcat UI. Clicking this icon:

  1. Executes the applicable plugins.
  2. Collects the generated annotations.
  3. Saves the results into a Sidecar Extension file.

Available Plugins

swcat currently includes the following plugin types:

  • AsyncAPI Importer: Imports channel and message definitions from AsyncAPI specifications.
  • External Plugins (deprecated): Integrate any external tool or script via JSON over stdin/stdout.
  • gRPC Plugins: Integrate remote services via a defined gRPC interface.
  • JFrog Xray BOM: Automatically retrieves SBOM data from JFrog Xray.

Tip

For details on how to visualize the annotations generated by plugins, see Custom Content.