Refactor code structure and optimize performance across multiple modules

This commit is contained in:
StellaOps Bot
2025-12-26 20:03:22 +02:00
parent c786faae84
commit b4fc66feb6
3353 changed files with 88254 additions and 1590657 deletions

View File

@@ -0,0 +1,83 @@
# GitHub SCM Connector
# GitHub.com and GitHub Enterprise Server integration
id: stellaops.scm.connector.github
name: GitHub Connector
version: 1.0.0
description: |
Integrates with GitHub for remediation automation.
Supports PR creation, status checks, and security alerts.
assembly: StellaOps.AdvisoryAI.ScmConnector.GitHub.dll
capabilities:
- pull-request
- status-check
- security-advisories
- dependabot
- code-scanning
- branch-protection
requirements:
runtime: net10.0
platforms: [linux-x64, linux-arm64, win-x64, osx-arm64]
enabled: false
priority: 100
config:
# GitHub API settings
api:
# Base URL (empty = github.com)
baseUrl: "${GITHUB_BASE_URL:-}"
# API version
apiVersion: "2022-11-28"
# Authentication
auth:
# Authentication type: pat, app, oauth
type: pat
# Personal Access Token
token: "${GITHUB_TOKEN:-}"
# GitHub App credentials (for app type)
appId: "${GITHUB_APP_ID:-}"
privateKeyPath: "${GITHUB_APP_PRIVATE_KEY_PATH:-}"
installationId: "${GITHUB_APP_INSTALLATION_ID:-}"
# Pull request settings
pullRequest:
# Create draft PRs
draft: false
# Request reviewers
requestReviewers: true
defaultReviewers: []
# Labels
labels: ["security", "dependencies", "stellaops"]
# Body template
bodyTemplate: |
## Security Remediation
This PR was automatically created by StellaOps to address:
{{#each vulnerabilities}}
- **{{this.id}}**: {{this.summary}}
{{/each}}
### Changes
{{changes}}
---
🤖 Generated by [StellaOps](https://stellaops.io)
# Status checks
statusCheck:
# Create commit status
enabled: true
# Context name
context: "stellaops/security-gate"
# Rate limiting
rateLimit:
# Respect GitHub rate limits
respectLimits: true
# Retry on rate limit
retryOnLimit: true
maxWaitSeconds: 3600

View File

@@ -0,0 +1,82 @@
# GitLab SCM Connector
# GitLab.com and self-hosted GitLab integration
id: stellaops.scm.connector.gitlab
name: GitLab Connector
version: 1.0.0
description: |
Integrates with GitLab for remediation automation.
Supports MR creation, pipeline triggers, and security dashboards.
assembly: StellaOps.AdvisoryAI.ScmConnector.GitLab.dll
capabilities:
- merge-request
- pipeline-trigger
- security-dashboard
- dependency-scanning
- container-scanning
requirements:
runtime: net10.0
platforms: [linux-x64, linux-arm64, win-x64, osx-arm64]
enabled: false
priority: 100
config:
# GitLab API settings
api:
# Base URL (empty = gitlab.com)
baseUrl: "${GITLAB_BASE_URL:-}"
# API version
apiVersion: "v4"
# Authentication
auth:
# Authentication type: token, oauth
type: token
# Personal Access Token or Project Token
token: "${GITLAB_TOKEN:-}"
# OAuth credentials (for oauth type)
clientId: "${GITLAB_OAUTH_CLIENT_ID:-}"
clientSecret: "${GITLAB_OAUTH_CLIENT_SECRET:-}"
# Merge request settings
mergeRequest:
# Create as draft
draft: false
# Remove source branch on merge
removeSourceBranch: true
# Squash commits
squash: true
# Assignees
assignees: []
# Labels
labels: ["security", "dependencies", "stellaops"]
# Description template
descriptionTemplate: |
## Security Remediation
This MR was automatically created by StellaOps.
### Vulnerabilities Addressed
{{#each vulnerabilities}}
- **{{this.id}}**: {{this.summary}}
{{/each}}
### Changes
{{changes}}
/label ~security ~dependencies
# Pipeline settings
pipeline:
# Trigger pipeline on MR creation
triggerPipeline: true
# Wait for pipeline
waitForPipeline: false
# Rate limiting
rateLimit:
requestsPerSecond: 10
burstSize: 20

View File

@@ -0,0 +1,79 @@
# SCM (Source Control Management) Connector Registry
# Source control integrations for remediation automation
version: "1.0"
category: scm
# Global SCM settings
defaults:
enabled: false # Explicitly enable connectors
timeout: "00:01:00"
retry:
maxRetries: 3
backoffMs: 1000
# ============================================================================
# SCM CONNECTORS
# ============================================================================
connectors:
github:
enabled: false
priority: 100
config: github.yaml
description: "GitHub.com and GitHub Enterprise Server"
gitlab:
enabled: false
priority: 100
config: gitlab.yaml
description: "GitLab.com and self-hosted GitLab"
azure-devops:
enabled: false
priority: 100
config: azure-devops.yaml
description: "Azure DevOps Services and Server"
bitbucket:
enabled: false
priority: 100
config: bitbucket.yaml
description: "Bitbucket Cloud and Data Center"
gitea:
enabled: false
priority: 90
config: gitea.yaml
description: "Gitea, Forgejo, Codeberg"
# ============================================================================
# COMMON SCM SETTINGS
# ============================================================================
common:
# PR/MR creation
pullRequest:
# Default branch for PRs
defaultBaseBranch: main
# PR title prefix
titlePrefix: "[StellaOps]"
# Auto-merge if checks pass
autoMerge: false
# Delete branch after merge
deleteBranchOnMerge: true
# Commit settings
commit:
# Commit message prefix
messagePrefix: "fix:"
# Sign commits
signCommits: true
# Commit author
authorName: "StellaOps Bot"
authorEmail: "bot@stellaops.example.com"
# Branch naming
branch:
# Branch name pattern
pattern: "stellaops/remediate-{vuln-id}"
# Max branch name length
maxLength: 100