opentide 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- opentide-0.1.0/.agents/skills/cli-e2e-testing/SKILL.md +126 -0
- opentide-0.1.0/.agents/skills/codeql/SKILL.md +46 -0
- opentide-0.1.0/.agents/skills/docs-maintenance/SKILL.md +100 -0
- opentide-0.1.0/.agents/skills/github-actions-templates/SKILL.md +328 -0
- opentide-0.1.0/.agents/skills/jujutsu/SKILL.md +147 -0
- opentide-0.1.0/.agents/skills/jujutsu-stacked-prs/SKILL.md +11 -0
- opentide-0.1.0/.agents/skills/pytest-coverage/SKILL.md +28 -0
- opentide-0.1.0/.agents/skills/python-mcp-server-generator/SKILL.md +105 -0
- opentide-0.1.0/.agents/skills/python-testing-patterns/SKILL.md +278 -0
- opentide-0.1.0/.agents/skills/python-testing-patterns/references/advanced-patterns.md +411 -0
- opentide-0.1.0/.agents/skills/python-testing-patterns/references/details.md +349 -0
- opentide-0.1.0/.agents/skills/python-typing/SKILL.md +51 -0
- opentide-0.1.0/.agents/skills/ruff/SKILL.md +53 -0
- opentide-0.1.0/.agents/skills/ruff-recursive-fix/SKILL.md +7 -0
- opentide-0.1.0/.agents/skills/uv/SKILL.md +68 -0
- opentide-0.1.0/.agents/skills/uv-package-manager/SKILL.md +7 -0
- opentide-0.1.0/.agents/skills/uv-package-manager/references/advanced-patterns.md +473 -0
- opentide-0.1.0/.github/copilot-instructions.md +18 -0
- opentide-0.1.0/.github/dependabot.yml +11 -0
- opentide-0.1.0/.github/release-notes/v0.1.0.md +39 -0
- opentide-0.1.0/.github/workflows/ci.yml +209 -0
- opentide-0.1.0/.github/workflows/codeql.yml +51 -0
- opentide-0.1.0/.github/workflows/docs.yml +34 -0
- opentide-0.1.0/.github/workflows/publish-pypi.yml +40 -0
- opentide-0.1.0/.github/workflows/stack-comment.yml +55 -0
- opentide-0.1.0/.gitignore +90 -0
- opentide-0.1.0/.opentide/schemas/visibility.1.0.schema.json +3 -0
- opentide-0.1.0/.pre-commit-config.yaml +57 -0
- opentide-0.1.0/AGENTS.md +127 -0
- opentide-0.1.0/CHANGELOG.md +41 -0
- opentide-0.1.0/LICENSE +287 -0
- opentide-0.1.0/PKG-INFO +96 -0
- opentide-0.1.0/README.md +35 -0
- opentide-0.1.0/coretide-logo.png +0 -0
- opentide-0.1.0/data/specifications.lock.json +45 -0
- opentide-0.1.0/docs/README.md +87 -0
- opentide-0.1.0/docs/cli/deploy.md +85 -0
- opentide-0.1.0/docs/cli/exit-codes.md +69 -0
- opentide-0.1.0/docs/cli/generate.md +160 -0
- opentide-0.1.0/docs/cli/global-options.md +53 -0
- opentide-0.1.0/docs/cli/index.md +77 -0
- opentide-0.1.0/docs/cli/info.md +69 -0
- opentide-0.1.0/docs/cli/meta.json +18 -0
- opentide-0.1.0/docs/cli/setup.md +180 -0
- opentide-0.1.0/docs/cli/validate.md +82 -0
- opentide-0.1.0/docs/fumadocs/README.md +56 -0
- opentide-0.1.0/docs/fumadocs/source.config.ts.example +16 -0
- opentide-0.1.0/docs/index.md +50 -0
- opentide-0.1.0/docs/internal/behaviour-inventory.md +156 -0
- opentide-0.1.0/docs/internal/meta.json +4 -0
- opentide-0.1.0/docs/internal/pypi-trusted-publishing.md +67 -0
- opentide-0.1.0/docs/internal/test-plan.md +117 -0
- opentide-0.1.0/docs/mcp/configuration.md +78 -0
- opentide-0.1.0/docs/mcp/index.md +68 -0
- opentide-0.1.0/docs/mcp/installation.md +48 -0
- opentide-0.1.0/docs/mcp/meta.json +14 -0
- opentide-0.1.0/docs/mcp/resources.md +92 -0
- opentide-0.1.0/docs/mcp/tools.md +267 -0
- opentide-0.1.0/docs/meta.json +11 -0
- opentide-0.1.0/docs/sdk/documentation.md +121 -0
- opentide-0.1.0/docs/sdk/index.md +102 -0
- opentide-0.1.0/docs/sdk/installation.md +54 -0
- opentide-0.1.0/docs/sdk/meta.json +17 -0
- opentide-0.1.0/docs/sdk/models.md +161 -0
- opentide-0.1.0/docs/sdk/platforms.md +136 -0
- opentide-0.1.0/docs/sdk/registry.md +108 -0
- opentide-0.1.0/docs/sdk/validation.md +96 -0
- opentide-0.1.0/docs/usage/choosing-an-interface.md +83 -0
- opentide-0.1.0/docs/usage/concepts/glossary.md +91 -0
- opentide-0.1.0/docs/usage/concepts/meta.json +4 -0
- opentide-0.1.0/docs/usage/concepts/object-model.md +202 -0
- opentide-0.1.0/docs/usage/concepts/platforms.md +60 -0
- opentide-0.1.0/docs/usage/concepts/schema-revision.md +64 -0
- opentide-0.1.0/docs/usage/configuration.md +160 -0
- opentide-0.1.0/docs/usage/how-it-works.md +103 -0
- opentide-0.1.0/docs/usage/index.md +59 -0
- opentide-0.1.0/docs/usage/installation.md +139 -0
- opentide-0.1.0/docs/usage/meta.json +32 -0
- opentide-0.1.0/docs/usage/migration/index.md +151 -0
- opentide-0.1.0/docs/usage/migration/meta.json +4 -0
- opentide-0.1.0/docs/usage/migration/prompt.md +71 -0
- opentide-0.1.0/docs/usage/quickstart.md +126 -0
- opentide-0.1.0/docs/usage/releases.md +40 -0
- opentide-0.1.0/docs/usage/repository-setup.md +124 -0
- opentide-0.1.0/docs/usage/troubleshooting.md +125 -0
- opentide-0.1.0/docs/usage/tutorial.md +246 -0
- opentide-0.1.0/docs/usage/why-opentide.md +55 -0
- opentide-0.1.0/docs/usage/workflows/agentic-setup.md +143 -0
- opentide-0.1.0/docs/usage/workflows/ci-cd.md +207 -0
- opentide-0.1.0/docs/usage/workflows/detection-as-code.md +142 -0
- opentide-0.1.0/docs/usage/workflows/meta.json +4 -0
- opentide-0.1.0/pyproject.toml +258 -0
- opentide-0.1.0/scripts/absorb_engines.py +386 -0
- opentide-0.1.0/scripts/apply_phase2_renames.py +99 -0
- opentide-0.1.0/scripts/bench_io.py +99 -0
- opentide-0.1.0/scripts/build/README.md +42 -0
- opentide-0.1.0/scripts/build/sync_vocabularies.py +263 -0
- opentide-0.1.0/scripts/ci-local.sh +73 -0
- opentide-0.1.0/scripts/codeql-local.sh +71 -0
- opentide-0.1.0/scripts/decompose_phase1.py +263 -0
- opentide-0.1.0/scripts/github_stack_comment.py +197 -0
- opentide-0.1.0/scripts/jj-common.sh +39 -0
- opentide-0.1.0/scripts/jj-setup.sh +102 -0
- opentide-0.1.0/scripts/jj-stack-status.sh +25 -0
- opentide-0.1.0/scripts/jj-stack-submit.sh +101 -0
- opentide-0.1.0/scripts/jj-submit.sh +77 -0
- opentide-0.1.0/scripts/rewrite_engines_imports.py +147 -0
- opentide-0.1.0/scripts/validate-docs.sh +101 -0
- opentide-0.1.0/scripts/vocabulary/README.md +56 -0
- opentide-0.1.0/scripts/vocabulary/bump_versions.py +74 -0
- opentide-0.1.0/scripts/vocabulary/fetch_attack_stix.py +27 -0
- opentide-0.1.0/scripts/vocabulary/generate_actors.py +47 -0
- opentide-0.1.0/scripts/vocabulary/generate_attack.py +48 -0
- opentide-0.1.0/scripts/vocabulary/migrate_yaml_to_toml.py +92 -0
- opentide-0.1.0/skills-lock.json +71 -0
- opentide-0.1.0/src/opentide/__init__.py +8 -0
- opentide-0.1.0/src/opentide/_version.py +24 -0
- opentide-0.1.0/src/opentide/ci/__init__.py +6 -0
- opentide-0.1.0/src/opentide/ci/azure.py +174 -0
- opentide-0.1.0/src/opentide/ci/discovery.py +31 -0
- opentide-0.1.0/src/opentide/ci/github.py +279 -0
- opentide-0.1.0/src/opentide/ci/gitlab.py +176 -0
- opentide-0.1.0/src/opentide/ci/inflight.py +283 -0
- opentide-0.1.0/src/opentide/ci/models.py +86 -0
- opentide-0.1.0/src/opentide/ci/render.py +23 -0
- opentide-0.1.0/src/opentide/ci/stages.py +64 -0
- opentide-0.1.0/src/opentide/cli/__init__.py +540 -0
- opentide-0.1.0/src/opentide/cli/context.py +72 -0
- opentide-0.1.0/src/opentide/cli/enums.py +113 -0
- opentide-0.1.0/src/opentide/cli/exit_codes.py +59 -0
- opentide-0.1.0/src/opentide/cli/output.py +101 -0
- opentide-0.1.0/src/opentide/cli/services/__init__.py +1 -0
- opentide-0.1.0/src/opentide/cli/services/ci_generator.py +19 -0
- opentide-0.1.0/src/opentide/cli/services/deploy.py +123 -0
- opentide-0.1.0/src/opentide/cli/services/document.py +46 -0
- opentide-0.1.0/src/opentide/cli/services/export.py +49 -0
- opentide-0.1.0/src/opentide/cli/services/extraction.py +54 -0
- opentide-0.1.0/src/opentide/cli/services/generation.py +151 -0
- opentide-0.1.0/src/opentide/cli/services/info.py +74 -0
- opentide-0.1.0/src/opentide/cli/services/setup/__init__.py +17 -0
- opentide-0.1.0/src/opentide/cli/services/setup/ci.py +68 -0
- opentide-0.1.0/src/opentide/cli/services/setup/interactive.py +158 -0
- opentide-0.1.0/src/opentide/cli/services/setup/mcp.py +90 -0
- opentide-0.1.0/src/opentide/cli/services/setup/orchestrator.py +281 -0
- opentide-0.1.0/src/opentide/cli/services/setup/platforms.py +74 -0
- opentide-0.1.0/src/opentide/cli/services/setup/repo.py +128 -0
- opentide-0.1.0/src/opentide/cli/services/setup/skills.py +245 -0
- opentide-0.1.0/src/opentide/cli/services/setup/skills_registry.py +252 -0
- opentide-0.1.0/src/opentide/cli/services/setup/templates.py +69 -0
- opentide-0.1.0/src/opentide/cli/services/setup/vscode.py +145 -0
- opentide-0.1.0/src/opentide/cli/services/validation.py +246 -0
- opentide-0.1.0/src/opentide/cli/setup_app.py +498 -0
- opentide-0.1.0/src/opentide/core/__init__.py +5 -0
- opentide-0.1.0/src/opentide/core/chaining.py +32 -0
- opentide-0.1.0/src/opentide/core/debug.py +17 -0
- opentide-0.1.0/src/opentide/core/environment.py +111 -0
- opentide-0.1.0/src/opentide/core/errors.py +82 -0
- opentide-0.1.0/src/opentide/core/files.py +182 -0
- opentide-0.1.0/src/opentide/core/index_manager.py +52 -0
- opentide-0.1.0/src/opentide/core/io.py +113 -0
- opentide-0.1.0/src/opentide/core/logging/__init__.py +35 -0
- opentide-0.1.0/src/opentide/core/logging/config.py +201 -0
- opentide-0.1.0/src/opentide/core/logging/console.py +89 -0
- opentide-0.1.0/src/opentide/core/logging/render.py +63 -0
- opentide-0.1.0/src/opentide/core/object_refs.py +27 -0
- opentide-0.1.0/src/opentide/core/registry.py +601 -0
- opentide-0.1.0/src/opentide/core/root.py +41 -0
- opentide-0.1.0/src/opentide/core/runtime.py +23 -0
- opentide-0.1.0/src/opentide/core/time.py +21 -0
- opentide-0.1.0/src/opentide/core/types.py +23 -0
- opentide-0.1.0/src/opentide/core/typing.py +5 -0
- opentide-0.1.0/src/opentide/data/__init__.py +1 -0
- opentide-0.1.0/src/opentide/data/configurations/__init__.py +1 -0
- opentide-0.1.0/src/opentide/data/configurations/deployment.toml +61 -0
- opentide-0.1.0/src/opentide/data/configurations/documentation.toml +38 -0
- opentide-0.1.0/src/opentide/data/configurations/global.toml +54 -0
- opentide-0.1.0/src/opentide/data/configurations/paths.toml +46 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/__init__.py +1 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/carbon_black_cloud.toml +29 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/crowdstrike.toml +31 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/defender_for_endpoint.toml +32 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/harfanglab.toml +31 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/sentinel.toml +34 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/sentinel_one.toml +33 -0
- opentide-0.1.0/src/opentide/data/configurations/platforms/splunk.toml +68 -0
- opentide-0.1.0/src/opentide/data/configurations/resources.toml +2 -0
- opentide-0.1.0/src/opentide/data/configurations/schema.toml +32 -0
- opentide-0.1.0/src/opentide/data/configurations/visibility.toml +4 -0
- opentide-0.1.0/src/opentide/data/external/.gitkeep +0 -0
- opentide-0.1.0/src/opentide/data/log_sources/LOG0000 - Log Source TEMPLATE.yaml +38 -0
- opentide-0.1.0/src/opentide/data/log_sources/LOG0001 - Proto AWS Security Hub.yaml +172 -0
- opentide-0.1.0/src/opentide/data/log_sources/Proto Doc AWS Security Hub.md +138 -0
- opentide-0.1.0/src/opentide/data/pins/objective.toml +15 -0
- opentide-0.1.0/src/opentide/data/pins/rule.toml +10 -0
- opentide-0.1.0/src/opentide/data/pins/threat.toml +29 -0
- opentide-0.1.0/src/opentide/data/setup/mcp/README.md +17 -0
- opentide-0.1.0/src/opentide/data/setup/mcp/claude-code.json +7 -0
- opentide-0.1.0/src/opentide/data/setup/mcp/cursor.json +7 -0
- opentide-0.1.0/src/opentide/data/setup/mcp/generic.json +7 -0
- opentide-0.1.0/src/opentide/data/setup/mcp/vscode.json +7 -0
- opentide-0.1.0/src/opentide/data/setup/skills/AGENTS.md.template +30 -0
- opentide-0.1.0/src/opentide/data/setup/skills/CLAUDE.md.template +29 -0
- opentide-0.1.0/src/opentide/data/setup/skills/copilot-instructions.md +21 -0
- opentide-0.1.0/src/opentide/data/setup/skills/detection-ops/SKILL.md +47 -0
- opentide-0.1.0/src/opentide/data/setup/vscode/settings.fragment.json +5 -0
- opentide-0.1.0/src/opentide/data/skills/manifest.json +143 -0
- opentide-0.1.0/src/opentide/data/vocabulary/actors.vocab.toml +6766 -0
- opentide-0.1.0/src/opentide/data/vocabulary/alert_severity.vocab.toml +30 -0
- opentide-0.1.0/src/opentide/data/vocabulary/att&ck.groups.vocab.toml +894 -0
- opentide-0.1.0/src/opentide/data/vocabulary/att&ck.vocab.toml +6188 -0
- opentide-0.1.0/src/opentide/data/vocabulary/chaining_relations.vocab.toml +72 -0
- opentide-0.1.0/src/opentide/data/vocabulary/collection.vocab.toml +386 -0
- opentide-0.1.0/src/opentide/data/vocabulary/criticality.vocab.toml +48 -0
- opentide-0.1.0/src/opentide/data/vocabulary/datasources.vocab.toml +721 -0
- opentide-0.1.0/src/opentide/data/vocabulary/detection.composition.vocab.toml +35 -0
- opentide-0.1.0/src/opentide/data/vocabulary/detection.methodology.vocab.toml +55 -0
- opentide-0.1.0/src/opentide/data/vocabulary/detection.types.vocab.toml +25 -0
- opentide-0.1.0/src/opentide/data/vocabulary/efforts.vocab.toml +22 -0
- opentide-0.1.0/src/opentide/data/vocabulary/feasibility.vocab.toml +40 -0
- opentide-0.1.0/src/opentide/data/vocabulary/impact.vocab.toml +101 -0
- opentide-0.1.0/src/opentide/data/vocabulary/killchain.vocab.toml +133 -0
- opentide-0.1.0/src/opentide/data/vocabulary/level.vocab.toml +35 -0
- opentide-0.1.0/src/opentide/data/vocabulary/leverage.vocab.toml +106 -0
- opentide-0.1.0/src/opentide/data/vocabulary/malapi.vocab.toml +2254 -0
- opentide-0.1.0/src/opentide/data/vocabulary/maturity.vocab.toml +60 -0
- opentide-0.1.0/src/opentide/data/vocabulary/mitigations.vocab.toml +660 -0
- opentide-0.1.0/src/opentide/data/vocabulary/objectives.vocab.toml +84 -0
- opentide-0.1.0/src/opentide/data/vocabulary/pap.vocab.toml +30 -0
- opentide-0.1.0/src/opentide/data/vocabulary/resources.vocab.toml +41 -0
- opentide-0.1.0/src/opentide/data/vocabulary/responders.vocab.toml +7 -0
- opentide-0.1.0/src/opentide/data/vocabulary/rsit.vocab.toml +201 -0
- opentide-0.1.0/src/opentide/data/vocabulary/scheduling.vocab.toml +93 -0
- opentide-0.1.0/src/opentide/data/vocabulary/sectors.vocab.toml +253 -0
- opentide-0.1.0/src/opentide/data/vocabulary/severity.vocab.toml +36 -0
- opentide-0.1.0/src/opentide/data/vocabulary/signal.entities.vocab.toml +188 -0
- opentide-0.1.0/src/opentide/data/vocabulary/sophistication.vocab.toml +49 -0
- opentide-0.1.0/src/opentide/data/vocabulary/stakeholders.vocab.toml +46 -0
- opentide-0.1.0/src/opentide/data/vocabulary/surface.vocab.toml +4528 -0
- opentide-0.1.0/src/opentide/data/vocabulary/tier.vocab.toml +49 -0
- opentide-0.1.0/src/opentide/data/vocabulary/tlp.vocab.toml +41 -0
- opentide-0.1.0/src/opentide/data/vocabulary/viability.vocab.toml +53 -0
- opentide-0.1.0/src/opentide/data/vocabulary/violation.vocab.toml +41 -0
- opentide-0.1.0/src/opentide/deployment/__init__.py +53 -0
- opentide-0.1.0/src/opentide/deployment/ci.py +49 -0
- opentide-0.1.0/src/opentide/deployment/git_backend.py +192 -0
- opentide-0.1.0/src/opentide/deployment/git_repo.py +276 -0
- opentide-0.1.0/src/opentide/deployment/planning.py +364 -0
- opentide-0.1.0/src/opentide/deployment/preview.py +90 -0
- opentide-0.1.0/src/opentide/deployment/utils.py +226 -0
- opentide-0.1.0/src/opentide/documentation/__init__.py +78 -0
- opentide-0.1.0/src/opentide/documentation/api.py +138 -0
- opentide-0.1.0/src/opentide/documentation/catalog.py +427 -0
- opentide-0.1.0/src/opentide/documentation/cli.py +328 -0
- opentide-0.1.0/src/opentide/documentation/config.py +60 -0
- opentide-0.1.0/src/opentide/documentation/context.py +38 -0
- opentide-0.1.0/src/opentide/documentation/diagram/__init__.py +13 -0
- opentide-0.1.0/src/opentide/documentation/diagram/builders.py +186 -0
- opentide-0.1.0/src/opentide/documentation/diagram/flowchart.py +41 -0
- opentide-0.1.0/src/opentide/documentation/diagram/graph.py +48 -0
- opentide-0.1.0/src/opentide/documentation/diagram/mindmap.py +17 -0
- opentide-0.1.0/src/opentide/documentation/diagram/sanitize.py +37 -0
- opentide-0.1.0/src/opentide/documentation/format/__init__.py +6 -0
- opentide-0.1.0/src/opentide/documentation/format/azure_devops.py +50 -0
- opentide-0.1.0/src/opentide/documentation/format/factory.py +21 -0
- opentide-0.1.0/src/opentide/documentation/format/generic.py +17 -0
- opentide-0.1.0/src/opentide/documentation/format/github.py +17 -0
- opentide-0.1.0/src/opentide/documentation/format/gitlab.py +49 -0
- opentide-0.1.0/src/opentide/documentation/format/protocol.py +114 -0
- opentide-0.1.0/src/opentide/documentation/markdown/builder.py +8 -0
- opentide-0.1.0/src/opentide/documentation/markdown/links.py +117 -0
- opentide-0.1.0/src/opentide/documentation/objects/__init__.py +14 -0
- opentide-0.1.0/src/opentide/documentation/objects/base.py +79 -0
- opentide-0.1.0/src/opentide/documentation/objects/objective.py +45 -0
- opentide-0.1.0/src/opentide/documentation/objects/rule.py +47 -0
- opentide-0.1.0/src/opentide/documentation/objects/threat.py +84 -0
- opentide-0.1.0/src/opentide/documentation/parts/__init__.py +5 -0
- opentide-0.1.0/src/opentide/documentation/parts/sections.py +585 -0
- opentide-0.1.0/src/opentide/documentation/publish/index.py +178 -0
- opentide-0.1.0/src/opentide/documentation/publish/paths.py +33 -0
- opentide-0.1.0/src/opentide/documentation/publish/writer.py +11 -0
- opentide-0.1.0/src/opentide/documentation/types.py +46 -0
- opentide-0.1.0/src/opentide/documentation/vocabulary.py +51 -0
- opentide-0.1.0/src/opentide/export/attack_navigator_layer.py +160 -0
- opentide-0.1.0/src/opentide/export/explorer_export.py +238 -0
- opentide-0.1.0/src/opentide/export/playbook_map.py +42 -0
- opentide-0.1.0/src/opentide/export/revisions_export.py +57 -0
- opentide-0.1.0/src/opentide/export/table_export.py +129 -0
- opentide-0.1.0/src/opentide/extraction/__init__.py +1 -0
- opentide-0.1.0/src/opentide/extraction/malapi.py +94 -0
- opentide-0.1.0/src/opentide/extraction/mde_importer.py +228 -0
- opentide-0.1.0/src/opentide/extraction/sentinel_importer.py +387 -0
- opentide-0.1.0/src/opentide/generation/__init__.py +34 -0
- opentide-0.1.0/src/opentide/generation/artifact_gate.py +135 -0
- opentide-0.1.0/src/opentide/generation/framework.py +530 -0
- opentide-0.1.0/src/opentide/generation/model_json_schema.py +21 -0
- opentide-0.1.0/src/opentide/generation/pydantic_metaschema.py +345 -0
- opentide-0.1.0/src/opentide/generation/pydantic_schemas.py +111 -0
- opentide-0.1.0/src/opentide/generation/pydantic_templates.py +48 -0
- opentide-0.1.0/src/opentide/generation/router_schema.py +46 -0
- opentide-0.1.0/src/opentide/generation/schema.py +46 -0
- opentide-0.1.0/src/opentide/generation/schema_pipeline.py +894 -0
- opentide-0.1.0/src/opentide/generation/schema_utils.py +14 -0
- opentide-0.1.0/src/opentide/generation/template.py +10 -0
- opentide-0.1.0/src/opentide/generation/template_engine.py +289 -0
- opentide-0.1.0/src/opentide/generation/template_renderer.py +103 -0
- opentide-0.1.0/src/opentide/generation/vocabulary.py +486 -0
- opentide-0.1.0/src/opentide/generation/vscode_snippets.py +83 -0
- opentide-0.1.0/src/opentide/indexing/__init__.py +4 -0
- opentide-0.1.0/src/opentide/indexing/inflight.py +304 -0
- opentide-0.1.0/src/opentide/indexing/inflight_change.py +127 -0
- opentide-0.1.0/src/opentide/indexing/inflight_shard.py +71 -0
- opentide-0.1.0/src/opentide/indexing/object_vocab.py +138 -0
- opentide-0.1.0/src/opentide/loading/__init__.py +13 -0
- opentide-0.1.0/src/opentide/loading/compat.py +20 -0
- opentide-0.1.0/src/opentide/loading/config_loader.py +64 -0
- opentide-0.1.0/src/opentide/loading/object_loader.py +95 -0
- opentide-0.1.0/src/opentide/loading/objective_loader.py +18 -0
- opentide-0.1.0/src/opentide/loading/platform_loader.py +465 -0
- opentide-0.1.0/src/opentide/loading/rule_loader.py +58 -0
- opentide-0.1.0/src/opentide/mcp_server/__init__.py +1 -0
- opentide-0.1.0/src/opentide/mcp_server/catalog.py +114 -0
- opentide-0.1.0/src/opentide/mcp_server/constants.py +8 -0
- opentide-0.1.0/src/opentide/mcp_server/resources.py +96 -0
- opentide-0.1.0/src/opentide/mcp_server/server.py +166 -0
- opentide-0.1.0/src/opentide/mcp_server/tools.py +148 -0
- opentide-0.1.0/src/opentide/models/__init__.py +58 -0
- opentide-0.1.0/src/opentide/models/base.py +49 -0
- opentide-0.1.0/src/opentide/models/deployment_enums.py +49 -0
- opentide-0.1.0/src/opentide/models/enums.py +43 -0
- opentide-0.1.0/src/opentide/models/metadata.py +59 -0
- opentide-0.1.0/src/opentide/models/migration.py +24 -0
- opentide-0.1.0/src/opentide/models/object_types.py +17 -0
- opentide-0.1.0/src/opentide/models/objective.py +82 -0
- opentide-0.1.0/src/opentide/models/platform.py +157 -0
- opentide-0.1.0/src/opentide/models/platform_configs.py +321 -0
- opentide-0.1.0/src/opentide/models/platform_schema.py +200 -0
- opentide-0.1.0/src/opentide/models/response.py +24 -0
- opentide-0.1.0/src/opentide/models/results.py +18 -0
- opentide-0.1.0/src/opentide/models/rule.py +116 -0
- opentide-0.1.0/src/opentide/models/schema_registry.py +138 -0
- opentide-0.1.0/src/opentide/models/system_config.py +238 -0
- opentide-0.1.0/src/opentide/models/threat.py +58 -0
- opentide-0.1.0/src/opentide/models/version.py +102 -0
- opentide-0.1.0/src/opentide/models/visibility.py +59 -0
- opentide-0.1.0/src/opentide/models/vocab_pins.py +67 -0
- opentide-0.1.0/src/opentide/mutation/__init__.py +1 -0
- opentide-0.1.0/src/opentide/mutation/file_name.py +60 -0
- opentide-0.1.0/src/opentide/mutation/promotion.py +213 -0
- opentide-0.1.0/src/opentide/mutation/references.py +138 -0
- opentide-0.1.0/src/opentide/mutation/security_domain.py +122 -0
- opentide-0.1.0/src/opentide/package/__init__.py +5 -0
- opentide-0.1.0/src/opentide/package/paths.py +30 -0
- opentide-0.1.0/src/opentide/platforms/__init__.py +1 -0
- opentide-0.1.0/src/opentide/platforms/base.py +54 -0
- opentide-0.1.0/src/opentide/platforms/carbon_black/__init__.py +15 -0
- opentide-0.1.0/src/opentide/platforms/carbon_black/client.py +133 -0
- opentide-0.1.0/src/opentide/platforms/carbon_black/deployer.py +195 -0
- opentide-0.1.0/src/opentide/platforms/carbon_black/validator.py +96 -0
- opentide-0.1.0/src/opentide/platforms/carbon_black.py +7 -0
- opentide-0.1.0/src/opentide/platforms/config.py +243 -0
- opentide-0.1.0/src/opentide/platforms/crowdstrike/__init__.py +3 -0
- opentide-0.1.0/src/opentide/platforms/crowdstrike/client.py +144 -0
- opentide-0.1.0/src/opentide/platforms/crowdstrike/deployer.py +148 -0
- opentide-0.1.0/src/opentide/platforms/crowdstrike.py +7 -0
- opentide-0.1.0/src/opentide/platforms/defender_for_endpoint/__init__.py +3 -0
- opentide-0.1.0/src/opentide/platforms/defender_for_endpoint/client.py +196 -0
- opentide-0.1.0/src/opentide/platforms/defender_for_endpoint/deployer.py +278 -0
- opentide-0.1.0/src/opentide/platforms/defender_for_endpoint/validator.py +196 -0
- opentide-0.1.0/src/opentide/platforms/defender_for_endpoint.py +7 -0
- opentide-0.1.0/src/opentide/platforms/enabled.py +30 -0
- opentide-0.1.0/src/opentide/platforms/harfanglab/__init__.py +3 -0
- opentide-0.1.0/src/opentide/platforms/harfanglab/client.py +405 -0
- opentide-0.1.0/src/opentide/platforms/harfanglab/deployer.py +227 -0
- opentide-0.1.0/src/opentide/platforms/harfanglab.py +7 -0
- opentide-0.1.0/src/opentide/platforms/kql.py +62 -0
- opentide-0.1.0/src/opentide/platforms/plugins.py +211 -0
- opentide-0.1.0/src/opentide/platforms/registry.py +186 -0
- opentide-0.1.0/src/opentide/platforms/sentinel/__init__.py +3 -0
- opentide-0.1.0/src/opentide/platforms/sentinel/client.py +39 -0
- opentide-0.1.0/src/opentide/platforms/sentinel/deployer.py +189 -0
- opentide-0.1.0/src/opentide/platforms/sentinel/validator.py +83 -0
- opentide-0.1.0/src/opentide/platforms/sentinel.py +7 -0
- opentide-0.1.0/src/opentide/platforms/sentinel_one/__init__.py +3 -0
- opentide-0.1.0/src/opentide/platforms/sentinel_one/client.py +180 -0
- opentide-0.1.0/src/opentide/platforms/sentinel_one/deployer.py +143 -0
- opentide-0.1.0/src/opentide/platforms/sentinel_one/validator.py +55 -0
- opentide-0.1.0/src/opentide/platforms/sentinel_one.py +7 -0
- opentide-0.1.0/src/opentide/platforms/splunk/__init__.py +15 -0
- opentide-0.1.0/src/opentide/platforms/splunk/client.py +264 -0
- opentide-0.1.0/src/opentide/platforms/splunk/deployer.py +466 -0
- opentide-0.1.0/src/opentide/platforms/splunk/validator.py +120 -0
- opentide-0.1.0/src/opentide/platforms/splunk.py +7 -0
- opentide-0.1.0/src/opentide/py.typed +0 -0
- opentide-0.1.0/src/opentide/registry/__init__.py +15 -0
- opentide-0.1.0/src/opentide/registry/artifacts.py +29 -0
- opentide-0.1.0/src/opentide/registry/builder.py +289 -0
- opentide-0.1.0/src/opentide/registry/discovery.py +41 -0
- opentide-0.1.0/src/opentide/registry/paths.py +175 -0
- opentide-0.1.0/src/opentide/schemas/__init__.py +8 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Carbon Black Cloud Enterprise EDR Template.yaml +15 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Crowdstrike Falcon Correlation Rules Template.yaml +13 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Crowdstrike Falcon Template.yaml +13 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/HarfangLab Template.yaml +14 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Microsoft Defender for Endpoint Template.yaml +17 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Microsoft Sentinel Template.yaml +17 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Sentinel One Template.yaml +11 -0
- opentide-0.1.0/src/opentide/schemas/data/platform_templates/MDR Systems Deployment/Templates/Splunk Enterprise Template.yaml +16 -0
- opentide-0.1.0/src/opentide/schemas/data/vocabulary.schema.json +45 -0
- opentide-0.1.0/src/opentide/schemas/store.py +45 -0
- opentide-0.1.0/src/opentide/validation/__init__.py +42 -0
- opentide-0.1.0/src/opentide/validation/carbon_black_cloud_query.py +7 -0
- opentide-0.1.0/src/opentide/validation/checks/__init__.py +1 -0
- opentide-0.1.0/src/opentide/validation/checks/cross_object.py +133 -0
- opentide-0.1.0/src/opentide/validation/checks/kinds.py +14 -0
- opentide-0.1.0/src/opentide/validation/cve.py +35 -0
- opentide-0.1.0/src/opentide/validation/cve_check.py +78 -0
- opentide-0.1.0/src/opentide/validation/deprecated_fields.py +104 -0
- opentide-0.1.0/src/opentide/validation/errors.py +115 -0
- opentide-0.1.0/src/opentide/validation/field_vocab.py +164 -0
- opentide-0.1.0/src/opentide/validation/id_scan.py +74 -0
- opentide-0.1.0/src/opentide/validation/id_uniqueness.py +33 -0
- opentide-0.1.0/src/opentide/validation/issues.py +60 -0
- opentide-0.1.0/src/opentide/validation/legacy.py +47 -0
- opentide-0.1.0/src/opentide/validation/parallel.py +79 -0
- opentide-0.1.0/src/opentide/validation/pipeline.py +78 -0
- opentide-0.1.0/src/opentide/validation/preflight.py +171 -0
- opentide-0.1.0/src/opentide/validation/scope.py +75 -0
- opentide-0.1.0/src/opentide/validation/session.py +398 -0
- opentide-0.1.0/src/opentide/validation/splunk_query.py +7 -0
- opentide-0.1.0/src/opentide/validation/tide_schema.py +68 -0
- opentide-0.1.0/src/opentide/validation/uuid_v4.py +33 -0
- opentide-0.1.0/src/opentide/validation/vocab_resolver.py +321 -0
- opentide-0.1.0/src/opentide/vocabulary/__init__.py +21 -0
- opentide-0.1.0/src/opentide/vocabulary/fetch_stix.py +71 -0
- opentide-0.1.0/src/opentide/vocabulary/generate_actors.py +86 -0
- opentide-0.1.0/src/opentide/vocabulary/generate_attack.py +133 -0
- opentide-0.1.0/src/opentide/vocabulary/io.py +100 -0
- opentide-0.1.0/src/opentide/vocabulary/stix_attack.py +229 -0
- opentide-0.1.0/src/opentide/vocabulary/writers.py +43 -0
- opentide-0.1.0/tests/conftest.py +114 -0
- opentide-0.1.0/tests/fixtures/documentation/objective-shai-hulud.yaml +54 -0
- opentide-0.1.0/tests/fixtures/documentation/rule-shai-hulud-sentinel.yaml +58 -0
- opentide-0.1.0/tests/fixtures/documentation/threat-azure-gather-victim-data.yaml +29 -0
- opentide-0.1.0/tests/fixtures/generation/artifact_checksums.json +16 -0
- opentide-0.1.0/tests/fixtures/generation/configurations/systems/carbon_black_cloud.toml +2 -0
- opentide-0.1.0/tests/fixtures/generation/configurations/systems/crowdstrike.toml +2 -0
- opentide-0.1.0/tests/fixtures/generation/configurations/systems/defender_for_endpoint.toml +2 -0
- opentide-0.1.0/tests/fixtures/generation/configurations/systems/sentinel.toml +2 -0
- opentide-0.1.0/tests/fixtures/generation/configurations/systems/sentinel_one.toml +2 -0
- opentide-0.1.0/tests/fixtures/generation/metaschema_checksums.json +5 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/exports/objects.export.json +17 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/exports/revisions.export.json +1 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/schemas/objective.1.0.schema.json +161 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/schemas/opentide.schema.json +95 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/schemas/rule.1.0.schema.json +250 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/schemas/threat.1.0.schema.json +161 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/schemas/visibility.1.0.schema.json +3 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/templates/objective.1.0.template.yaml +18 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/templates/rule.1.0.template.yaml +30 -0
- opentide-0.1.0/tests/fixtures/generation/tide_workspace/.opentide/templates/threat.1.0.template.yaml +18 -0
- opentide-0.1.0/tests/fixtures/inflight/example-shard.json +47 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/carbon_black_cloud.toml +24 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/crowdstrike.toml +31 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/defender_for_endpoint.toml +32 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/harfanglab.toml +31 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/sentinel.toml +34 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/sentinel_one.toml +33 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Configurations/systems/splunk.toml +68 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Objectives/objective-0001-credential-access.yaml +34 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0001-sentinel-kql.yaml +40 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0002-defender-kql.yaml +36 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0003-splunk-spl.yaml +28 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0004-sentinel-one-s1ql.yaml +38 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0005-carbon-black-lucene.yaml +27 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0006-crowdstrike-deploy-only.yaml +33 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0007-harfanglab-deploy-only.yaml +36 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Detection Rules/rule-0008-staging-promote.yaml +38 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Objects/Threat Vectors/threat-0001-simulated-actor.yaml +22 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Configurations/visibility.schema.json +52 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Detection Objective.schema.json +160 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Exports/ATT&CK Navigator Layer.json +23 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Exports/Objects Table.csv +1 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Indexes/revisions.json +1 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/MDR Schema.json +938 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/TVM Schema.json +160 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Templates/Detection Objective.template.yaml +18 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Templates/MDR TEMPLATE.yaml +30 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/current/Schemas/Templates/TVM TEMPLATE.yaml +18 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/future/rule_1_1/.gitkeep +1 -0
- opentide-0.1.0/tests/fixtures/tide_corpus/manifest.toml +14 -0
- opentide-0.1.0/tests/test_ci/test_azure.py +34 -0
- opentide-0.1.0/tests/test_ci/test_ci_discovery.py +29 -0
- opentide-0.1.0/tests/test_ci/test_github.py +90 -0
- opentide-0.1.0/tests/test_ci/test_gitlab.py +35 -0
- opentide-0.1.0/tests/test_ci/test_render.py +14 -0
- opentide-0.1.0/tests/test_ci/test_stages.py +60 -0
- opentide-0.1.0/tests/test_cli/__init__.py +1 -0
- opentide-0.1.0/tests/test_cli/conftest.py +231 -0
- opentide-0.1.0/tests/test_cli/e2e/__snapshots__/test_info_e2e.ambr +54 -0
- opentide-0.1.0/tests/test_cli/e2e/test_console_script_smoke.py +58 -0
- opentide-0.1.0/tests/test_cli/e2e/test_deploy_e2e.py +79 -0
- opentide-0.1.0/tests/test_cli/e2e/test_exit_codes_e2e.py +33 -0
- opentide-0.1.0/tests/test_cli/e2e/test_export_e2e.py +15 -0
- opentide-0.1.0/tests/test_cli/e2e/test_generate_e2e.py +16 -0
- opentide-0.1.0/tests/test_cli/e2e/test_help_and_flags.py +44 -0
- opentide-0.1.0/tests/test_cli/e2e/test_info_e2e.py +43 -0
- opentide-0.1.0/tests/test_cli/e2e/test_schema_compat_e2e.py +18 -0
- opentide-0.1.0/tests/test_cli/e2e/test_validate_e2e.py +60 -0
- opentide-0.1.0/tests/test_cli/test_app.py +212 -0
- opentide-0.1.0/tests/test_cli/test_ci_cli.py +42 -0
- opentide-0.1.0/tests/test_cli/test_ci_generator.py +105 -0
- opentide-0.1.0/tests/test_cli/test_context.py +43 -0
- opentide-0.1.0/tests/test_cli/test_deploy_service.py +166 -0
- opentide-0.1.0/tests/test_cli/test_document_service.py +41 -0
- opentide-0.1.0/tests/test_cli/test_enums.py +16 -0
- opentide-0.1.0/tests/test_cli/test_exit_codes.py +71 -0
- opentide-0.1.0/tests/test_cli/test_export_service.py +44 -0
- opentide-0.1.0/tests/test_cli/test_extraction_service.py +37 -0
- opentide-0.1.0/tests/test_cli/test_generation_service.py +101 -0
- opentide-0.1.0/tests/test_cli/test_info_service.py +103 -0
- opentide-0.1.0/tests/test_cli/test_output.py +112 -0
- opentide-0.1.0/tests/test_cli/test_setup.py +168 -0
- opentide-0.1.0/tests/test_cli/test_setup_app_coverage.py +254 -0
- opentide-0.1.0/tests/test_cli/test_setup_ci.py +50 -0
- opentide-0.1.0/tests/test_cli/test_setup_cli.py +144 -0
- opentide-0.1.0/tests/test_cli/test_setup_interactive.py +89 -0
- opentide-0.1.0/tests/test_cli/test_setup_mcp.py +48 -0
- opentide-0.1.0/tests/test_cli/test_setup_platforms.py +25 -0
- opentide-0.1.0/tests/test_cli/test_setup_repo.py +38 -0
- opentide-0.1.0/tests/test_cli/test_setup_skills.py +170 -0
- opentide-0.1.0/tests/test_cli/test_setup_skills_registry.py +204 -0
- opentide-0.1.0/tests/test_cli/test_setup_templates.py +117 -0
- opentide-0.1.0/tests/test_cli/test_setup_vscode.py +165 -0
- opentide-0.1.0/tests/test_cli/test_setup_wizard.py +183 -0
- opentide-0.1.0/tests/test_cli/test_startup_latency.py +67 -0
- opentide-0.1.0/tests/test_cli/test_validation.py +15 -0
- opentide-0.1.0/tests/test_cli/test_validation_service.py +220 -0
- opentide-0.1.0/tests/test_core/__init__.py +0 -0
- opentide-0.1.0/tests/test_core/test_chaining.py +45 -0
- opentide-0.1.0/tests/test_core/test_files.py +129 -0
- opentide-0.1.0/tests/test_core/test_index_manager.py +26 -0
- opentide-0.1.0/tests/test_core/test_io.py +85 -0
- opentide-0.1.0/tests/test_core/test_io_extended.py +59 -0
- opentide-0.1.0/tests/test_core/test_logging.py +215 -0
- opentide-0.1.0/tests/test_core/test_object_refs.py +36 -0
- opentide-0.1.0/tests/test_core/test_registry.py +285 -0
- opentide-0.1.0/tests/test_core/test_root.py +62 -0
- opentide-0.1.0/tests/test_core/test_runtime.py +25 -0
- opentide-0.1.0/tests/test_core/test_time.py +22 -0
- opentide-0.1.0/tests/test_core/test_types.py +13 -0
- opentide-0.1.0/tests/test_deployment/__snapshots__/test_deploy_payloads.ambr +217 -0
- opentide-0.1.0/tests/test_deployment/test_deploy_payloads.py +56 -0
- opentide-0.1.0/tests/test_deployment/test_deployment_init.py +43 -0
- opentide-0.1.0/tests/test_deployment/test_git_backend.py +10 -0
- opentide-0.1.0/tests/test_deployment/test_tide_deployment_splunk_cbc.py +106 -0
- opentide-0.1.0/tests/test_deployment/test_utils_dedup.py +16 -0
- opentide-0.1.0/tests/test_documentation/__init__.py +0 -0
- opentide-0.1.0/tests/test_documentation/__snapshots__/test_snapshots.ambr +252 -0
- opentide-0.1.0/tests/test_documentation/_snapshot_helpers.py +211 -0
- opentide-0.1.0/tests/test_documentation/test_api.py +97 -0
- opentide-0.1.0/tests/test_documentation/test_catalog.py +287 -0
- opentide-0.1.0/tests/test_documentation/test_cli_document.py +20 -0
- opentide-0.1.0/tests/test_documentation/test_cli_documentation.py +160 -0
- opentide-0.1.0/tests/test_documentation/test_config.py +43 -0
- opentide-0.1.0/tests/test_documentation/test_context.py +15 -0
- opentide-0.1.0/tests/test_documentation/test_diagram_builders.py +135 -0
- opentide-0.1.0/tests/test_documentation/test_diagram_snapshots.py +80 -0
- opentide-0.1.0/tests/test_documentation/test_formatters.py +34 -0
- opentide-0.1.0/tests/test_documentation/test_links.py +89 -0
- opentide-0.1.0/tests/test_documentation/test_mindmap.py +24 -0
- opentide-0.1.0/tests/test_documentation/test_object_renderers.py +134 -0
- opentide-0.1.0/tests/test_documentation/test_publish_index.py +143 -0
- opentide-0.1.0/tests/test_documentation/test_publish_paths.py +34 -0
- opentide-0.1.0/tests/test_documentation/test_renderers.py +26 -0
- opentide-0.1.0/tests/test_documentation/test_sections.py +370 -0
- opentide-0.1.0/tests/test_documentation/test_snapshots.py +28 -0
- opentide-0.1.0/tests/test_documentation/test_vocabulary.py +72 -0
- opentide-0.1.0/tests/test_export/__init__.py +0 -0
- opentide-0.1.0/tests/test_export/test_attack_navigator.py +127 -0
- opentide-0.1.0/tests/test_export/test_playbook_map.py +32 -0
- opentide-0.1.0/tests/test_export/test_revisions_export.py +53 -0
- opentide-0.1.0/tests/test_export/test_table_export.py +163 -0
- opentide-0.1.0/tests/test_extraction/test_malapi.py +174 -0
- opentide-0.1.0/tests/test_extraction/test_sentinel_helpers.py +34 -0
- opentide-0.1.0/tests/test_generation/__init__.py +0 -0
- opentide-0.1.0/tests/test_generation/test_artifact_gate.py +77 -0
- opentide-0.1.0/tests/test_generation/test_artifact_gate_extended.py +65 -0
- opentide-0.1.0/tests/test_generation/test_artifact_gate_verify.py +37 -0
- opentide-0.1.0/tests/test_generation/test_framework.py +118 -0
- opentide-0.1.0/tests/test_generation/test_framework_extended.py +68 -0
- opentide-0.1.0/tests/test_generation/test_framework_more.py +84 -0
- opentide-0.1.0/tests/test_generation/test_framework_relations.py +48 -0
- opentide-0.1.0/tests/test_generation/test_metaschema_deletion_gate.py +53 -0
- opentide-0.1.0/tests/test_generation/test_pydantic_metaschema.py +41 -0
- opentide-0.1.0/tests/test_generation/test_pydantic_metaschema_extended.py +39 -0
- opentide-0.1.0/tests/test_generation/test_pydantic_schemas.py +17 -0
- opentide-0.1.0/tests/test_generation/test_pydantic_schemas_run.py +45 -0
- opentide-0.1.0/tests/test_generation/test_pydantic_templates.py +26 -0
- opentide-0.1.0/tests/test_generation/test_schema.py +34 -0
- opentide-0.1.0/tests/test_generation/test_schema_pipeline_gen_json_schema.py +133 -0
- opentide-0.1.0/tests/test_generation/test_schema_pipeline_helpers.py +23 -0
- opentide-0.1.0/tests/test_generation/test_schema_pipeline_resolvers.py +158 -0
- opentide-0.1.0/tests/test_generation/test_schema_pipeline_vocabulary.py +56 -0
- opentide-0.1.0/tests/test_generation/test_schema_run.py +18 -0
- opentide-0.1.0/tests/test_generation/test_template_engine.py +116 -0
- opentide-0.1.0/tests/test_generation/test_template_renderer.py +12 -0
- opentide-0.1.0/tests/test_generation/test_template_run.py +13 -0
- opentide-0.1.0/tests/test_generation/test_vocab_entry_version.py +31 -0
- opentide-0.1.0/tests/test_generation/test_vocab_revision.py +123 -0
- opentide-0.1.0/tests/test_generation/test_vocabulary_extended.py +117 -0
- opentide-0.1.0/tests/test_generation/test_vocabulary_loader.py +45 -0
- opentide-0.1.0/tests/test_generation/test_vocabulary_parse.py +24 -0
- opentide-0.1.0/tests/test_generation/test_vocabulary_resolver.py +79 -0
- opentide-0.1.0/tests/test_generation/test_vscode_snippets.py +49 -0
- opentide-0.1.0/tests/test_indexing/__init__.py +0 -0
- opentide-0.1.0/tests/test_indexing/test_inflight.py +181 -0
- opentide-0.1.0/tests/test_indexing/test_inflight_change.py +186 -0
- opentide-0.1.0/tests/test_indexing/test_inflight_shard.py +82 -0
- opentide-0.1.0/tests/test_indexing/test_object_vocab.py +103 -0
- opentide-0.1.0/tests/test_loading/__init__.py +0 -0
- opentide-0.1.0/tests/test_loading/test_compat.py +12 -0
- opentide-0.1.0/tests/test_loading/test_config_loader.py +48 -0
- opentide-0.1.0/tests/test_loading/test_objective_loader.py +58 -0
- opentide-0.1.0/tests/test_loading/test_platform_loaders.py +182 -0
- opentide-0.1.0/tests/test_loading/test_rule_loader.py +61 -0
- opentide-0.1.0/tests/test_loading/test_rule_loader_extended.py +34 -0
- opentide-0.1.0/tests/test_mcp/__init__.py +1 -0
- opentide-0.1.0/tests/test_mcp/test_catalog.py +83 -0
- opentide-0.1.0/tests/test_mcp/test_catalog_filters.py +73 -0
- opentide-0.1.0/tests/test_mcp/test_catalog_objects.py +32 -0
- opentide-0.1.0/tests/test_mcp/test_resources.py +13 -0
- opentide-0.1.0/tests/test_mcp/test_resources_expanded.py +69 -0
- opentide-0.1.0/tests/test_mcp/test_tools.py +21 -0
- opentide-0.1.0/tests/test_mcp/test_tools_expanded.py +70 -0
- opentide-0.1.0/tests/test_mcp/test_tools_validation_report.py +28 -0
- opentide-0.1.0/tests/test_models/__init__.py +0 -0
- opentide-0.1.0/tests/test_models/test_base.py +30 -0
- opentide-0.1.0/tests/test_models/test_enums.py +37 -0
- opentide-0.1.0/tests/test_models/test_metadata.py +16 -0
- opentide-0.1.0/tests/test_models/test_migration.py +30 -0
- opentide-0.1.0/tests/test_models/test_objective.py +35 -0
- opentide-0.1.0/tests/test_models/test_platform.py +52 -0
- opentide-0.1.0/tests/test_models/test_rule.py +74 -0
- opentide-0.1.0/tests/test_models/test_schema_revision.py +180 -0
- opentide-0.1.0/tests/test_models/test_threat.py +28 -0
- opentide-0.1.0/tests/test_models/test_version.py +98 -0
- opentide-0.1.0/tests/test_package/__init__.py +0 -0
- opentide-0.1.0/tests/test_package/test_layout.py +67 -0
- opentide-0.1.0/tests/test_package/test_public_api.py +98 -0
- opentide-0.1.0/tests/test_package_lazy_exports.py +65 -0
- opentide-0.1.0/tests/test_platforms/__init__.py +0 -0
- opentide-0.1.0/tests/test_platforms/test_base_deployer.py +29 -0
- opentide-0.1.0/tests/test_platforms/test_capabilities.py +47 -0
- opentide-0.1.0/tests/test_platforms/test_kql.py +67 -0
- opentide-0.1.0/tests/test_platforms/test_plugins_deprecation.py +29 -0
- opentide-0.1.0/tests/test_platforms/test_plugins_extended.py +143 -0
- opentide-0.1.0/tests/test_platforms/test_registry.py +22 -0
- opentide-0.1.0/tests/test_platforms/test_registry_extended.py +110 -0
- opentide-0.1.0/tests/test_platforms/test_splunk_deployer.py +234 -0
- opentide-0.1.0/tests/test_platforms/test_system_config_dual_toml.py +93 -0
- opentide-0.1.0/tests/test_registry/test_builder_import_safety.py +63 -0
- opentide-0.1.0/tests/test_registry/test_discovery.py +32 -0
- opentide-0.1.0/tests/test_registry/test_index_resilience.py +131 -0
- opentide-0.1.0/tests/test_schemas/__init__.py +0 -0
- opentide-0.1.0/tests/test_schemas/test_store.py +28 -0
- opentide-0.1.0/tests/test_schemas/test_store_extended.py +15 -0
- opentide-0.1.0/tests/test_scripts/test_github_stack_comment.py +47 -0
- opentide-0.1.0/tests/test_scripts/test_sync_vocabularies.py +110 -0
- opentide-0.1.0/tests/test_validation/__init__.py +0 -0
- opentide-0.1.0/tests/test_validation/test_cross_object.py +65 -0
- opentide-0.1.0/tests/test_validation/test_cross_object_bulk.py +36 -0
- opentide-0.1.0/tests/test_validation/test_cve_check.py +59 -0
- opentide-0.1.0/tests/test_validation/test_deprecated_fields.py +38 -0
- opentide-0.1.0/tests/test_validation/test_errors.py +101 -0
- opentide-0.1.0/tests/test_validation/test_field_vocab.py +70 -0
- opentide-0.1.0/tests/test_validation/test_field_vocab_metaschema.py +27 -0
- opentide-0.1.0/tests/test_validation/test_field_vocab_walk.py +18 -0
- opentide-0.1.0/tests/test_validation/test_id_scan.py +73 -0
- opentide-0.1.0/tests/test_validation/test_issues.py +59 -0
- opentide-0.1.0/tests/test_validation/test_legacy.py +44 -0
- opentide-0.1.0/tests/test_validation/test_legacy_indicators.py +24 -0
- opentide-0.1.0/tests/test_validation/test_legacy_wrappers.py +45 -0
- opentide-0.1.0/tests/test_validation/test_package_exports.py +49 -0
- opentide-0.1.0/tests/test_validation/test_parallel.py +31 -0
- opentide-0.1.0/tests/test_validation/test_parallel_extended.py +80 -0
- opentide-0.1.0/tests/test_validation/test_pipeline.py +49 -0
- opentide-0.1.0/tests/test_validation/test_preflight.py +141 -0
- opentide-0.1.0/tests/test_validation/test_query_shims.py +17 -0
- opentide-0.1.0/tests/test_validation/test_session_cve.py +34 -0
- opentide-0.1.0/tests/test_validation/test_session_integration.py +52 -0
- opentide-0.1.0/tests/test_validation/test_session_scope.py +82 -0
- opentide-0.1.0/tests/test_validation/test_tide_schema.py +64 -0
- opentide-0.1.0/tests/test_validation/test_vocab_resolver.py +71 -0
- opentide-0.1.0/tests/test_vocabulary/test_fetch_stix.py +58 -0
- opentide-0.1.0/tests/test_vocabulary/test_generate_actors.py +166 -0
- opentide-0.1.0/tests/test_vocabulary/test_generate_attack.py +175 -0
- opentide-0.1.0/tests/test_vocabulary/test_io.py +114 -0
- opentide-0.1.0/tests/test_vocabulary/test_io_extended.py +43 -0
- opentide-0.1.0/tests/test_vocabulary/test_legacy_cleanup.py +34 -0
- opentide-0.1.0/tests/test_vocabulary/test_loader.py +343 -0
- opentide-0.1.0/tests/test_vocabulary/test_stix_attack.py +333 -0
- opentide-0.1.0/tests/test_vocabulary/test_writers.py +29 -0
- opentide-0.1.0/uv.lock +3073 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# CLI E2E Testing
|
|
2
|
+
|
|
3
|
+
Typer-native end-to-end tests for the `opentide` CLI using `CliRunner` (in-process) plus a small subprocess smoke layer.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Adding or changing CLI commands, flags, or JSON output shape
|
|
8
|
+
- Extending the simulated Tide workspace (`tide_corpus`)
|
|
9
|
+
- Deploy dry-run payload verification (unit + E2E)
|
|
10
|
+
- Schema forward-evolution scaffolds (`future/rule_1_1`)
|
|
11
|
+
|
|
12
|
+
## Terminology
|
|
13
|
+
|
|
14
|
+
Use **threat**, **objective**, and **rule** in fixture names and test labels. Do **not** use legacy prefixes MDR, DOM, or TVM.
|
|
15
|
+
|
|
16
|
+
| Object | Schema id | Filename pattern |
|
|
17
|
+
|----------|------------------|-------------------------------------|
|
|
18
|
+
| threat | `threat::1.0` | `threat-{id}-{slug}.yaml` |
|
|
19
|
+
| objective| `objective::1.0` | `objective-{id}-{slug}.yaml` |
|
|
20
|
+
| rule | `rule::1.0` | `rule-{id}-{platform}-{slug}.yaml` |
|
|
21
|
+
|
|
22
|
+
Baseline is current `*::1.0` only — no tide_1 legacy slices.
|
|
23
|
+
|
|
24
|
+
## Layout
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
tests/
|
|
28
|
+
fixtures/tide_corpus/
|
|
29
|
+
manifest.toml # slice lifecycle (current active, future reserved)
|
|
30
|
+
current/ # canonical E2E workspace
|
|
31
|
+
future/rule_1_1/ # reserved until rule::1.1 lands
|
|
32
|
+
test_cli/
|
|
33
|
+
conftest.py # cli_runner, tide_corpus_repo, invoke_cli, parse_cli_json
|
|
34
|
+
e2e/ # @pytest.mark.cli_e2e (and cli_smoke for subprocess)
|
|
35
|
+
test_deployment/
|
|
36
|
+
test_deploy_payloads.py # per-platform API payload golden tests
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Running tests
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# E2E only (development)
|
|
43
|
+
uv run pytest tests/test_cli/e2e/ -m "cli_e2e or cli_smoke" --no-cov
|
|
44
|
+
|
|
45
|
+
# Unit tests (excludes E2E markers — matches CI matrix)
|
|
46
|
+
uv run pytest tests/ -m "not cli_e2e and not cli_smoke"
|
|
47
|
+
|
|
48
|
+
# Local CI parity (unit then E2E)
|
|
49
|
+
scripts/ci-local.sh --full
|
|
50
|
+
|
|
51
|
+
# Update syrupy snapshots
|
|
52
|
+
uv run pytest tests/test_cli/e2e/ --snapshot-update
|
|
53
|
+
uv run pytest tests/test_deployment/test_deploy_payloads.py --snapshot-update
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## CI
|
|
57
|
+
|
|
58
|
+
- **Unit matrix** (Python 3.10–3.14): `-m "not cli_e2e and not cli_smoke"`
|
|
59
|
+
- **`cli-e2e` job** (Python 3.14 only, `needs: [test]`): `-m "cli_e2e or cli_smoke"`
|
|
60
|
+
- **`cli-windows-smoke` job**: `test_console_script_smoke.py -m cli_smoke` — the only coverage of `spawn` platforms
|
|
61
|
+
|
|
62
|
+
E2E does not contribute to coverage metrics.
|
|
63
|
+
|
|
64
|
+
### `cli_smoke` must stay out-of-process
|
|
65
|
+
|
|
66
|
+
`cli_e2e` uses `CliRunner`, which calls `app` inside the pytest process and never runs
|
|
67
|
+
the installed console script. `cli_smoke` covers that gap and therefore carries
|
|
68
|
+
`@pytest.mark.script_launch_mode("subprocess")` — `pytest-console-scripts` defaults to
|
|
69
|
+
`inprocess`, which only loads the entry point as a function and cannot catch import-time
|
|
70
|
+
failures (for example multiprocessing `spawn` re-importing the entry point).
|
|
71
|
+
|
|
72
|
+
Smoke tests also take `tide_corpus_repo` so the console script indexes a real corpus.
|
|
73
|
+
Running them against the default empty workspace makes them pass vacuously, because
|
|
74
|
+
object parsing never engages.
|
|
75
|
+
|
|
76
|
+
## Shared fixtures
|
|
77
|
+
|
|
78
|
+
| Fixture | Purpose |
|
|
79
|
+
|----------------------|------------------------------------------------------|
|
|
80
|
+
| `cli_runner` | `typer.testing.CliRunner()` |
|
|
81
|
+
| `tide_corpus_repo` | Copy of `current/` slice into `tmp_path` with env |
|
|
82
|
+
| `invoke_cli` | Helper: `--repo`, `--json` defaults |
|
|
83
|
+
| `parse_cli_json` | Extract top-level JSON from stdout (after indexer) |
|
|
84
|
+
| `corpus_rule_uuids` | Deterministic rule UUIDs per platform |
|
|
85
|
+
| `mock_query_validators` | No-op validators for validate query E2E |
|
|
86
|
+
|
|
87
|
+
## tide_corpus extension
|
|
88
|
+
|
|
89
|
+
1. Add YAML under `tests/fixtures/tide_corpus/current/Objects/…`
|
|
90
|
+
2. Use deterministic UUIDs (`00000000-0000-4000-8xxx-…`)
|
|
91
|
+
3. Include platform `configurations.*` blocks for deploy payload tests
|
|
92
|
+
4. Register new forward slices in `manifest.toml` (`status = "reserved"` → `"active"`)
|
|
93
|
+
|
|
94
|
+
## Deploy payload testing
|
|
95
|
+
|
|
96
|
+
**Unit** (`test_deploy_payloads.py`): load corpus rule → `preview_rule_deployment()` → syrupy snapshot of `api_request`.
|
|
97
|
+
|
|
98
|
+
**E2E** (`test_deploy_e2e.py`):
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
opentide --json --repo <corpus> deploy --dry-run --platform <platform> --plan FULL --wide --skip-promotion
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Assert `ok`, `dry_run`, `plan[platform]`, and `payloads[platform][]` with `uuid` + `api_request`.
|
|
105
|
+
|
|
106
|
+
Mock only the network boundary (`DeployTide.mdr` deployer); do not mock payload compilation.
|
|
107
|
+
|
|
108
|
+
## Mocking policy
|
|
109
|
+
|
|
110
|
+
| Mock | Do not mock |
|
|
111
|
+
|------------------------------|--------------------------------|
|
|
112
|
+
| HTTP / cloud SDK clients | Index loading, deploy plan |
|
|
113
|
+
| Query validators (E2E only) | JSON emission, exit codes |
|
|
114
|
+
| `modified_mdr_files` (mutate)| Payload preview compile path |
|
|
115
|
+
|
|
116
|
+
## Schema bump checklist
|
|
117
|
+
|
|
118
|
+
1. Bump Pydantic models / `SchemaVersionChain`
|
|
119
|
+
2. Add objects under `future/<slice>/`
|
|
120
|
+
3. Flip `manifest.toml` slice `status` to `active`
|
|
121
|
+
4. Regenerate syrupy snapshots
|
|
122
|
+
5. Remove `xfail` from `test_schema_compat_e2e.py` when slice is live
|
|
123
|
+
|
|
124
|
+
## JSON parsing note
|
|
125
|
+
|
|
126
|
+
The indexer prints progress to stdout before JSON. Use `parse_cli_json()` (first top-level `{` + `JSONDecoder.raw_decode`) — do not assume stdout is JSON-only.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# CodeQL — OpenTide
|
|
2
|
+
|
|
3
|
+
Static analysis for Python and GitHub Actions workflows. One workflow, no duplicate scans.
|
|
4
|
+
|
|
5
|
+
## When to use
|
|
6
|
+
|
|
7
|
+
- Adding or changing security-sensitive Python or workflow code
|
|
8
|
+
- Investigating CodeQL alerts on a PR
|
|
9
|
+
- Running analysis locally before a large security-related change
|
|
10
|
+
|
|
11
|
+
## CI workflow
|
|
12
|
+
|
|
13
|
+
[`.github/workflows/codeql.yml`](../../../.github/workflows/codeql.yml):
|
|
14
|
+
|
|
15
|
+
- **Languages:** `python` and `actions` in one matrix job (categories `/language:python` and `/language:actions`)
|
|
16
|
+
- **Why both in the workflow:** PR code-scanning comparison requires the same `(codeql.yml) /language:python` category registered on `development`; Code Quality dynamic scans alone leave PR checks in a NEUTRAL "configuration not found" state
|
|
17
|
+
- **Triggers:** push to `main`/`development`, all PRs, weekly schedule
|
|
18
|
+
- **Queries:** `security-extended`
|
|
19
|
+
- **Python deps:** `uv sync --group dev` before analyze
|
|
20
|
+
|
|
21
|
+
Code Quality may also run a dynamic Python scan on push; if duplicate alerts appear, disable Python in Code Quality settings and rely on this workflow.
|
|
22
|
+
|
|
23
|
+
## Local analysis
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
scripts/codeql-local.sh # create DB + analyze Python (~40–60s cold)
|
|
27
|
+
scripts/codeql-local.sh --install # brew install CodeQL CLI only
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Mirrors the Python path in CI. Not suitable for pre-commit or pre-push hooks.
|
|
31
|
+
|
|
32
|
+
Output: `codeql-results.sarif` at repo root.
|
|
33
|
+
|
|
34
|
+
## When to run locally vs CI
|
|
35
|
+
|
|
36
|
+
| Situation | Run |
|
|
37
|
+
|-----------|-----|
|
|
38
|
+
| Normal feature work | CI only |
|
|
39
|
+
| Workflow or auth changes | `scripts/codeql-local.sh` before push |
|
|
40
|
+
| Fixing a CodeQL alert | Local repro, then push fix |
|
|
41
|
+
| Pre-commit / pre-push | **Do not** — too slow |
|
|
42
|
+
|
|
43
|
+
## Related
|
|
44
|
+
|
|
45
|
+
- `AGENTS.md` — CI overview
|
|
46
|
+
- [`github-actions-templates`](../github-actions-templates/SKILL.md) — workflow authoring
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: opentide-docs-maintenance
|
|
3
|
+
description: >-
|
|
4
|
+
Maintain OpenTide documentation in docs/ — Fumadocs structure, frontmatter,
|
|
5
|
+
meta.json navigation, and keeping CLI/MCP/SDK pages in sync with code.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# OpenTide documentation maintenance
|
|
9
|
+
|
|
10
|
+
Use this skill when adding features, changing CLI/MCP/SDK surface area, or authoring pages under `docs/`.
|
|
11
|
+
|
|
12
|
+
## Doc structure (four tabs)
|
|
13
|
+
|
|
14
|
+
| Tab | Path | Update when |
|
|
15
|
+
|-----|------|-------------|
|
|
16
|
+
| Usage | `docs/usage/` | Setup flows, workflows, concepts, migration |
|
|
17
|
+
| CLI | `docs/cli/` | Typer commands, flags, behaviour |
|
|
18
|
+
| MCP | `docs/mcp/` | Tools, resources, config templates |
|
|
19
|
+
| SDK | `docs/sdk/` | Public Python API, registry, models |
|
|
20
|
+
|
|
21
|
+
Internal maintainer docs: `docs/internal/` (excluded from public site root).
|
|
22
|
+
|
|
23
|
+
Authoring conventions: [`docs/README.md`](../../docs/README.md).
|
|
24
|
+
|
|
25
|
+
## Page template
|
|
26
|
+
|
|
27
|
+
Every new page:
|
|
28
|
+
|
|
29
|
+
```markdown
|
|
30
|
+
---
|
|
31
|
+
title: Human title
|
|
32
|
+
description: One sentence for cards and search
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
# Human title
|
|
36
|
+
|
|
37
|
+
First paragraph explains purpose in plain language.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Optional Fumadocs fields: `icon`, `full`.
|
|
41
|
+
|
|
42
|
+
## Navigation
|
|
43
|
+
|
|
44
|
+
Add the page slug to the folder's `meta.json` `pages` array. Root tabs use `"root": true`.
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"pages": ["index", "---Section---", "new-page"]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Code change checklist
|
|
53
|
+
|
|
54
|
+
When modifying source, update docs in the **same PR**:
|
|
55
|
+
|
|
56
|
+
| Source file | Doc target |
|
|
57
|
+
|-------------|------------|
|
|
58
|
+
| `src/opentide/cli/__init__.py` | `docs/cli/*.md` |
|
|
59
|
+
| `src/opentide/cli/setup_app.py` | `docs/cli/setup.md`, `docs/usage/repository-setup.md` |
|
|
60
|
+
| `src/opentide/mcp_server/server.py` | `docs/mcp/tools.md`, `docs/mcp/resources.md` |
|
|
61
|
+
| `src/opentide/mcp_server/tools.py` | `docs/mcp/tools.md` |
|
|
62
|
+
| `src/opentide/core/registry.py` | `docs/sdk/registry.md` |
|
|
63
|
+
| `src/opentide/__init__.py` | `docs/sdk/index.md` |
|
|
64
|
+
| `src/opentide/cli/enums.py` (platforms) | `docs/usage/concepts/platforms.md` |
|
|
65
|
+
| `src/opentide/data/setup/skills/` | `docs/usage/workflows/agentic-setup.md` |
|
|
66
|
+
|
|
67
|
+
## Verify CLI accuracy
|
|
68
|
+
|
|
69
|
+
Extract live help when documenting flags:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
uv run opentide --help
|
|
73
|
+
uv run opentide <command> --help
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Do not document flags that do not exist (e.g. legacy `--scope` on `document` — use subcommands).
|
|
77
|
+
|
|
78
|
+
## Validation
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
scripts/validate-docs.sh
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Fixes: missing frontmatter, broken internal links, orphan pages not listed in meta.json.
|
|
85
|
+
|
|
86
|
+
## Platform capability rule
|
|
87
|
+
|
|
88
|
+
Seven platforms deploy; five validate queries. CrowdStrike and HarfangLab: **`supported: false`** for query validation — document this consistently in Usage, CLI, MCP, and SDK pages.
|
|
89
|
+
|
|
90
|
+
## Cross-linking
|
|
91
|
+
|
|
92
|
+
- Usage → CLI/MCP/SDK for "technical reference"
|
|
93
|
+
- CLI/MCP/SDK → Usage for "getting started"
|
|
94
|
+
- Relative paths only; no hardcoded `github.com/.../blob/` for in-repo pages
|
|
95
|
+
|
|
96
|
+
## Fumadocs site repo
|
|
97
|
+
|
|
98
|
+
**Build and deploy:** [OpenTideHQ/website](https://github.com/OpenTideHQ/website). This repo ships content under `docs/` only.
|
|
99
|
+
|
|
100
|
+
Notes: [`docs/fumadocs/`](../../docs/fumadocs/).
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: github-actions-templates
|
|
3
|
+
description: Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# GitHub Actions Templates
|
|
7
|
+
|
|
8
|
+
Production-ready GitHub Actions workflow patterns for testing, building, and deploying applications.
|
|
9
|
+
|
|
10
|
+
## Purpose
|
|
11
|
+
|
|
12
|
+
Create efficient, secure GitHub Actions workflows for continuous integration and deployment across various tech stacks.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- Automate testing and deployment
|
|
17
|
+
- Build Docker images and push to registries
|
|
18
|
+
- Deploy to Kubernetes clusters
|
|
19
|
+
- Run security scans
|
|
20
|
+
- Implement matrix builds for multiple environments
|
|
21
|
+
|
|
22
|
+
## Common Workflow Patterns
|
|
23
|
+
|
|
24
|
+
### Pattern 1: Test Workflow
|
|
25
|
+
|
|
26
|
+
```yaml
|
|
27
|
+
name: Test
|
|
28
|
+
|
|
29
|
+
on:
|
|
30
|
+
push:
|
|
31
|
+
branches: [main, develop]
|
|
32
|
+
pull_request:
|
|
33
|
+
branches: [main]
|
|
34
|
+
|
|
35
|
+
jobs:
|
|
36
|
+
test:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
|
|
39
|
+
strategy:
|
|
40
|
+
matrix:
|
|
41
|
+
node-version: [18.x, 20.x]
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
|
|
46
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
47
|
+
uses: actions/setup-node@v4
|
|
48
|
+
with:
|
|
49
|
+
node-version: ${{ matrix.node-version }}
|
|
50
|
+
cache: "npm"
|
|
51
|
+
|
|
52
|
+
- name: Install dependencies
|
|
53
|
+
run: npm ci
|
|
54
|
+
|
|
55
|
+
- name: Run linter
|
|
56
|
+
run: npm run lint
|
|
57
|
+
|
|
58
|
+
- name: Run tests
|
|
59
|
+
run: npm test
|
|
60
|
+
|
|
61
|
+
- name: Upload coverage
|
|
62
|
+
uses: codecov/codecov-action@v4
|
|
63
|
+
with:
|
|
64
|
+
files: ./coverage/lcov.info
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Reference:** See `assets/test-workflow.yml`
|
|
68
|
+
|
|
69
|
+
### Pattern 2: Build and Push Docker Image
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
name: Build and Push
|
|
73
|
+
|
|
74
|
+
on:
|
|
75
|
+
push:
|
|
76
|
+
branches: [main]
|
|
77
|
+
tags: ["v*"]
|
|
78
|
+
|
|
79
|
+
env:
|
|
80
|
+
REGISTRY: ghcr.io
|
|
81
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
82
|
+
|
|
83
|
+
jobs:
|
|
84
|
+
build:
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
permissions:
|
|
87
|
+
contents: read
|
|
88
|
+
packages: write
|
|
89
|
+
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
|
|
93
|
+
- name: Log in to Container Registry
|
|
94
|
+
uses: docker/login-action@v3
|
|
95
|
+
with:
|
|
96
|
+
registry: ${{ env.REGISTRY }}
|
|
97
|
+
username: ${{ github.actor }}
|
|
98
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
99
|
+
|
|
100
|
+
- name: Extract metadata
|
|
101
|
+
id: meta
|
|
102
|
+
uses: docker/metadata-action@v5
|
|
103
|
+
with:
|
|
104
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
105
|
+
tags: |
|
|
106
|
+
type=ref,event=branch
|
|
107
|
+
type=ref,event=pr
|
|
108
|
+
type=semver,pattern={{version}}
|
|
109
|
+
type=semver,pattern={{major}}.{{minor}}
|
|
110
|
+
|
|
111
|
+
- name: Build and push
|
|
112
|
+
uses: docker/build-push-action@v5
|
|
113
|
+
with:
|
|
114
|
+
context: .
|
|
115
|
+
push: true
|
|
116
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
117
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
118
|
+
cache-from: type=gha
|
|
119
|
+
cache-to: type=gha,mode=max
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Reference:** See `assets/deploy-workflow.yml`
|
|
123
|
+
|
|
124
|
+
### Pattern 3: Deploy to Kubernetes
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
name: Deploy to Kubernetes
|
|
128
|
+
|
|
129
|
+
on:
|
|
130
|
+
push:
|
|
131
|
+
branches: [main]
|
|
132
|
+
|
|
133
|
+
jobs:
|
|
134
|
+
deploy:
|
|
135
|
+
runs-on: ubuntu-latest
|
|
136
|
+
|
|
137
|
+
steps:
|
|
138
|
+
- uses: actions/checkout@v4
|
|
139
|
+
|
|
140
|
+
- name: Configure AWS credentials
|
|
141
|
+
uses: aws-actions/configure-aws-credentials@v4
|
|
142
|
+
with:
|
|
143
|
+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
144
|
+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
145
|
+
aws-region: us-west-2
|
|
146
|
+
|
|
147
|
+
- name: Update kubeconfig
|
|
148
|
+
run: |
|
|
149
|
+
aws eks update-kubeconfig --name production-cluster --region us-west-2
|
|
150
|
+
|
|
151
|
+
- name: Deploy to Kubernetes
|
|
152
|
+
run: |
|
|
153
|
+
kubectl apply -f k8s/
|
|
154
|
+
kubectl rollout status deployment/my-app -n production
|
|
155
|
+
kubectl get services -n production
|
|
156
|
+
|
|
157
|
+
- name: Verify deployment
|
|
158
|
+
run: |
|
|
159
|
+
kubectl get pods -n production
|
|
160
|
+
kubectl describe deployment my-app -n production
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Pattern 4: Matrix Build
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
name: Matrix Build
|
|
167
|
+
|
|
168
|
+
on: [push, pull_request]
|
|
169
|
+
|
|
170
|
+
jobs:
|
|
171
|
+
build:
|
|
172
|
+
runs-on: ${{ matrix.os }}
|
|
173
|
+
|
|
174
|
+
strategy:
|
|
175
|
+
matrix:
|
|
176
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
177
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
178
|
+
|
|
179
|
+
steps:
|
|
180
|
+
- uses: actions/checkout@v4
|
|
181
|
+
|
|
182
|
+
- name: Set up Python
|
|
183
|
+
uses: actions/setup-python@v5
|
|
184
|
+
with:
|
|
185
|
+
python-version: ${{ matrix.python-version }}
|
|
186
|
+
|
|
187
|
+
- name: Install dependencies
|
|
188
|
+
run: |
|
|
189
|
+
python -m pip install --upgrade pip
|
|
190
|
+
pip install -r requirements.txt
|
|
191
|
+
|
|
192
|
+
- name: Run tests
|
|
193
|
+
run: pytest
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
**Reference:** See `assets/matrix-build.yml`
|
|
197
|
+
|
|
198
|
+
## Workflow Best Practices
|
|
199
|
+
|
|
200
|
+
1. **Use specific action versions** (@v4, not @latest)
|
|
201
|
+
2. **Cache dependencies** to speed up builds
|
|
202
|
+
3. **Use secrets** for sensitive data
|
|
203
|
+
4. **Implement status checks** on PRs
|
|
204
|
+
5. **Use matrix builds** for multi-version testing
|
|
205
|
+
6. **Set appropriate permissions**
|
|
206
|
+
7. **Use reusable workflows** for common patterns
|
|
207
|
+
8. **Implement approval gates** for production
|
|
208
|
+
9. **Add notification steps** for failures
|
|
209
|
+
10. **Use self-hosted runners** for sensitive workloads
|
|
210
|
+
|
|
211
|
+
## Reusable Workflows
|
|
212
|
+
|
|
213
|
+
```yaml
|
|
214
|
+
# .github/workflows/reusable-test.yml
|
|
215
|
+
name: Reusable Test Workflow
|
|
216
|
+
|
|
217
|
+
on:
|
|
218
|
+
workflow_call:
|
|
219
|
+
inputs:
|
|
220
|
+
node-version:
|
|
221
|
+
required: true
|
|
222
|
+
type: string
|
|
223
|
+
secrets:
|
|
224
|
+
NPM_TOKEN:
|
|
225
|
+
required: true
|
|
226
|
+
|
|
227
|
+
jobs:
|
|
228
|
+
test:
|
|
229
|
+
runs-on: ubuntu-latest
|
|
230
|
+
steps:
|
|
231
|
+
- uses: actions/checkout@v4
|
|
232
|
+
- uses: actions/setup-node@v4
|
|
233
|
+
with:
|
|
234
|
+
node-version: ${{ inputs.node-version }}
|
|
235
|
+
- run: npm ci
|
|
236
|
+
- run: npm test
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**Use reusable workflow:**
|
|
240
|
+
|
|
241
|
+
```yaml
|
|
242
|
+
jobs:
|
|
243
|
+
call-test:
|
|
244
|
+
uses: ./.github/workflows/reusable-test.yml
|
|
245
|
+
with:
|
|
246
|
+
node-version: "20.x"
|
|
247
|
+
secrets:
|
|
248
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Security Scanning
|
|
252
|
+
|
|
253
|
+
```yaml
|
|
254
|
+
name: Security Scan
|
|
255
|
+
|
|
256
|
+
on:
|
|
257
|
+
push:
|
|
258
|
+
branches: [main]
|
|
259
|
+
pull_request:
|
|
260
|
+
branches: [main]
|
|
261
|
+
|
|
262
|
+
jobs:
|
|
263
|
+
security:
|
|
264
|
+
runs-on: ubuntu-latest
|
|
265
|
+
|
|
266
|
+
steps:
|
|
267
|
+
- uses: actions/checkout@v4
|
|
268
|
+
|
|
269
|
+
- name: Run Trivy vulnerability scanner
|
|
270
|
+
uses: aquasecurity/trivy-action@0.28.0
|
|
271
|
+
with:
|
|
272
|
+
scan-type: "fs"
|
|
273
|
+
scan-ref: "."
|
|
274
|
+
format: "sarif"
|
|
275
|
+
output: "trivy-results.sarif"
|
|
276
|
+
|
|
277
|
+
- name: Upload Trivy results to GitHub Security
|
|
278
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
279
|
+
with:
|
|
280
|
+
sarif_file: "trivy-results.sarif"
|
|
281
|
+
|
|
282
|
+
- name: Run Snyk Security Scan
|
|
283
|
+
uses: snyk/actions/node@0.4.0
|
|
284
|
+
env:
|
|
285
|
+
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Deployment with Approvals
|
|
289
|
+
|
|
290
|
+
```yaml
|
|
291
|
+
name: Deploy to Production
|
|
292
|
+
|
|
293
|
+
on:
|
|
294
|
+
push:
|
|
295
|
+
tags: ["v*"]
|
|
296
|
+
|
|
297
|
+
jobs:
|
|
298
|
+
deploy:
|
|
299
|
+
runs-on: ubuntu-latest
|
|
300
|
+
environment:
|
|
301
|
+
name: production
|
|
302
|
+
url: https://app.example.com
|
|
303
|
+
|
|
304
|
+
steps:
|
|
305
|
+
- uses: actions/checkout@v4
|
|
306
|
+
|
|
307
|
+
- name: Deploy application
|
|
308
|
+
run: |
|
|
309
|
+
echo "Deploying to production..."
|
|
310
|
+
# Deployment commands here
|
|
311
|
+
|
|
312
|
+
- name: Notify Slack
|
|
313
|
+
if: success()
|
|
314
|
+
uses: slackapi/slack-github-action@v1
|
|
315
|
+
with:
|
|
316
|
+
webhook-url: ${{ secrets.SLACK_WEBHOOK }}
|
|
317
|
+
payload: |
|
|
318
|
+
{
|
|
319
|
+
"text": "Deployment to production completed successfully!"
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
## Related Skills
|
|
325
|
+
|
|
326
|
+
- `gitlab-ci-patterns` - For GitLab CI workflows
|
|
327
|
+
- `deployment-pipeline-design` - For pipeline architecture
|
|
328
|
+
- `secrets-management` - For secrets handling
|