Skip to main content
Dotset CLI API Documentation / index / ArtifactOptions

Interface: ArtifactOptions

Defined in: src/shield/ci/index.ts:416 CI/CD Integration Module Native integration with GitHub Actions, GitLab CI, and other CI providers.

Example

import {
  detectCIEnvironment,
  ExitCodes,
  determineExitCode,
  writeGitHubSummary,
  createGitHubAnnotation,
  ArtifactManager,
} from '@dotsetlabs/cli';

// Detect CI environment
const env = detectCIEnvironment();
console.log(`Running on: ${env.provider}`);

// Determine exit code based on findings
const exitCode = determineExitCode(scanResult, { failOnSeverity: 'high' });

// GitHub Actions: Write job summary
if (env.provider === 'github') {
  await writeGitHubSummary(scanResult);

  // Create annotations for findings
  for (const finding of scanResult.findings) {
    createGitHubAnnotation(finding);
  }
}

// Manage artifacts
const artifacts = new ArtifactManager({ basePath: './artifacts' });
await artifacts.write('sarif', sarifContent, { filename: 'shield-results.sarif' });

process.exit(exitCode);

Properties

basePath?

optional basePath: string;
Defined in: src/shield/ci/index.ts:417

compress?

optional compress: boolean;
Defined in: src/shield/ci/index.ts:420

prefix?

optional prefix: string;
Defined in: src/shield/ci/index.ts:418

timestamp?

optional timestamp: boolean;
Defined in: src/shield/ci/index.ts:419