XStream

Source analysis and build plugins

Provides the repository's bounded source scanner, safe ZIP/TAR unpacker and Python/Java/Scala build recipes. It does not run uploaded programs on the host. See submission and isolation limits.

Extension contracts

Public contracts live in xstream-operator-sdk/contract:

External plugins compile against xstream-operator-sdk/contract, implement public no-argument classes, and list their class names in META-INF/services/<fully-qualified-contract-name>. Put the plugin JAR and its dependencies on the repository launcher's classpath (for example in the staged application's lib/), then restart. No core registry edit, server rebuild or client change is needed. Third-party archive dependencies stay in this plugin module. Duplicate build languages fail initialization; provide one recipe per language. This contract is implemented; semantic SAST, dependency vulnerability scanning and arbitrary build systems are not implemented.

For example, register a new analyzer using META-INF/services/xstream.operator.SourceAnalyzer containing example.CompanyAnalyzer. Report unsupported or failed analysis explicitly, rather than assigning a clean score. Analysis implementations are trusted administrator-installed code and must bound CPU, memory, file reads and report sizes.

Contract tests

cd plugins/xstream-plugin-source-analysis
sbt test

Tests cover clean source, network/deletion evidence, incomplete coverage, archive traversal and decompression limits. Repository tests cover source-only submission, private files, asynchronous analysis/build state, administrator review, trust and classification publication, submitter isolation and Token revocation. New plugins should add equivalent tests for malformed inputs, coverage gaps and resource limits.