ciso-assistant-api 2.3.7__tar.gz → 2.3.9__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.
- {ciso_assistant_api-2.3.7/ciso_assistant_api.egg-info → ciso_assistant_api-2.3.9}/PKG-INFO +4 -4
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/__init__.py +2 -2
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_base.py +4 -4
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/auth.py +12 -12
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/connector_sources.py +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/kg_ingest.py +3 -3
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/kg_media.py +2 -2
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp_server.py +4 -4
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/__init__.py +2 -2
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/certification.json +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/ciso.ttl +1 -1
- ciso_assistant_api-2.3.9/ciso_assistant_api/skills/ciso-assistant-api-development/SKILL.md +106 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/ciso-assistant-compliance-audit/SKILL.md +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/ciso-assistant-incident-evidence/SKILL.md +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/ciso-assistant-risk-management/SKILL.md +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9/ciso_assistant_api.egg-info}/PKG-INFO +4 -4
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/SOURCES.txt +1 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/entry_points.txt +5 -5
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/requires.txt +3 -3
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/pyproject.toml +7 -7
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_auth.py +1 -1
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_default_content_surfaces.py +6 -6
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_fleet_name.py +3 -3
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_kg_ingest.py +5 -3
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_kg_media.py +5 -3
- ciso_assistant_api-2.3.9/tests/test_publication_workflow.py +53 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_startup.py +1 -1
- ciso_assistant_api-2.3.7/tests/test_publication_workflow.py +0 -103
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/LICENSE +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/MANIFEST.in +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/README.md +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/__main__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/_operation_manifest.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_analytics_metrology.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_assets.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_auth_users.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_chat.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_compliance.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_crq.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_ebios_rm.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_evidence.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_frameworks_libraries.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_governance.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_incidents.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_integrations.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_privacy.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_resilience.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_risk_management.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_security_findings.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_settings.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_tasks_timeline.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_third_party.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api_client.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/bundled_mcp.json +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ciso_assistant_models.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/connectors/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_analytics_metrology.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_assets.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_auth_users.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_chat.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_compliance.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_crq.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_custom_api.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_ebios_rm.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_evidence.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_frameworks_libraries.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_governance.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_incidents.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_integrations.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_kg_ingest.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_privacy.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_resilience.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_risk_management.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_security_findings.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_settings.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_tasks_timeline.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_third_party.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/fixtures/records.json +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/mappings/source.yaml +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/migrations/manifest.json +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/shapes/connector.shacl.ttl +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/prompts/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/prompts/grc_specialist.json +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/ciso-assistant-operations/SKILL.md +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/skills/ciso-assistant-operations/agents/openai.yaml +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/specs/ciso_assistant.json +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/dependency_links.txt +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/top_level.txt +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/scripts/generate_from_openapi.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/scripts/security_sanitizer.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/setup.cfg +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/__init__.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/characterization/test_cxa_fl_cisoassistantapi_01_routing.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/characterization/test_cxa_fl_cisoassistantapi_02_routing.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/characterization/test_cxa_fl_cisoassistantapi_03_routing.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/conftest.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_ciso_assistant_brute_force_coverage.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_ciso_assistant_coverage.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_credential_refs.py +0 -0
- {ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_mcp_server.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ciso-assistant-api
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.9
|
|
4
4
|
Summary: CISO Assistant API + MCP Server — 100% API coverage
|
|
5
5
|
Author: Knuckles-Team
|
|
6
6
|
License: MIT
|
|
@@ -12,13 +12,13 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
15
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3
|
|
16
16
|
Requires-Dist: python-dotenv>=1.2.4
|
|
17
17
|
Requires-Dist: requests>=2.34.2
|
|
18
18
|
Provides-Extra: mcp
|
|
19
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
19
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3; extra == "mcp"
|
|
20
20
|
Provides-Extra: all
|
|
21
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
21
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3; extra == "all"
|
|
22
22
|
Provides-Extra: test
|
|
23
23
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
24
24
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
|
@@ -62,8 +62,8 @@ CONCEPT:AU-ECO.connector.ciso-assistant — CISO Assistant GRC connector (api-cl
|
|
|
62
62
|
"""
|
|
63
63
|
|
|
64
64
|
|
|
65
|
-
from
|
|
66
|
-
from
|
|
65
|
+
from scion_sdk.connector import Connector
|
|
66
|
+
from scion_sdk.connector_hooks import RegistrationContext
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
def _register_legacy_surface(context: RegistrationContext) -> None:
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_base.py
RENAMED
|
@@ -23,15 +23,15 @@ from typing import Any, TypeVar
|
|
|
23
23
|
from urllib.parse import quote, urlparse
|
|
24
24
|
|
|
25
25
|
import requests
|
|
26
|
-
from
|
|
26
|
+
from pydantic import ValidationError
|
|
27
|
+
from scion_sdk.exceptions import (
|
|
27
28
|
AuthError,
|
|
28
29
|
MissingParameterError,
|
|
29
30
|
ParameterError,
|
|
30
31
|
UnauthorizedError,
|
|
31
32
|
)
|
|
32
|
-
from
|
|
33
|
-
from
|
|
34
|
-
from pydantic import ValidationError
|
|
33
|
+
from scion_sdk.tls.profile import ResolvedTLSProfile
|
|
34
|
+
from scion_sdk.tls.resolve import resolve_tls_profile
|
|
35
35
|
|
|
36
36
|
from ciso_assistant_api.ciso_assistant_models import Response
|
|
37
37
|
|
|
@@ -9,19 +9,19 @@ Authentication priority:
|
|
|
9
9
|
username/password pair from the configured runtime secret backend. Secret
|
|
10
10
|
values are never part of durable provider configuration.
|
|
11
11
|
|
|
12
|
-
See ``docs/guides/oauth_sso.md`` in
|
|
12
|
+
See ``docs/guides/oauth_sso.md`` in scion-sdk for full details.
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
15
|
import logging
|
|
16
16
|
import threading
|
|
17
17
|
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
22
|
-
from
|
|
23
|
-
from
|
|
24
|
-
from
|
|
18
|
+
from scion_sdk.config import setting
|
|
19
|
+
from scion_sdk.credentials.references import SecretReferenceError
|
|
20
|
+
from scion_sdk.credentials.resolution import resolve_secret_reference
|
|
21
|
+
from scion_sdk.credentials.resolver import CredentialUnavailableError
|
|
22
|
+
from scion_sdk.exceptions import AuthError, UnauthorizedError
|
|
23
|
+
from scion_sdk.tls.profile import ResolvedTLSProfile
|
|
24
|
+
from scion_sdk.tls.resolve import resolve_tls_profile
|
|
25
25
|
|
|
26
26
|
local = threading.local()
|
|
27
27
|
from ciso_assistant_api.api_client import Api
|
|
@@ -30,14 +30,14 @@ logger = logging.getLogger(__name__)
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def _exchange_delegated_token() -> str:
|
|
33
|
-
"""RFC 8693 Token Exchange via ``
|
|
33
|
+
"""RFC 8693 Token Exchange via ``scion_sdk.auth.delegation``."""
|
|
34
34
|
import httpx
|
|
35
|
-
from
|
|
35
|
+
from scion_sdk.auth.delegation import (
|
|
36
36
|
DelegationSettings,
|
|
37
37
|
current_user_token,
|
|
38
38
|
exchange_token,
|
|
39
39
|
)
|
|
40
|
-
from
|
|
40
|
+
from scion_sdk.exceptions import LoginRequiredError
|
|
41
41
|
|
|
42
42
|
settings = DelegationSettings.from_settings()
|
|
43
43
|
subject_token = current_user_token()
|
|
@@ -80,7 +80,7 @@ def get_client(
|
|
|
80
80
|
profile_ref=setting("CISO_ASSISTANT_TLS_PROFILE_REF"),
|
|
81
81
|
)
|
|
82
82
|
|
|
83
|
-
from
|
|
83
|
+
from scion_sdk.auth.delegation import DelegationSettings
|
|
84
84
|
|
|
85
85
|
# --- Path 1: OIDC Delegation (RFC 8693 Token Exchange) ---
|
|
86
86
|
delegated = (
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/connector_sources.py
RENAMED
|
@@ -6,7 +6,7 @@ Served live as ``connector://resources``. Regenerate by editing the declarations
|
|
|
6
6
|
# ruff: noqa: E501
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
|
-
from
|
|
9
|
+
from scion_sdk.ingest.live_declaration import source_meta
|
|
10
10
|
|
|
11
11
|
CONNECTOR = "ciso-assistant-mcp"
|
|
12
12
|
|
|
@@ -7,7 +7,7 @@ compliance data into the ONE epistemic-graph knowledge graph as **typed OWL node
|
|
|
7
7
|
``:Asset``, ``:Vulnerability`` …) + links, matching the classes federated by
|
|
8
8
|
``ciso_assistant_api.ontology`` (``ciso.ttl``).
|
|
9
9
|
|
|
10
|
-
The write path is ``
|
|
10
|
+
The write path is ``scion_sdk.ingest`` -- the generated ``SourceIngest``
|
|
11
11
|
client, not a local ingestion helper. The MCP tool surface
|
|
12
12
|
(``ciso_assistant_api.mcp.mcp_kg_ingest``) exposes these as best-effort tools that
|
|
13
13
|
must never raise on an unreachable/misconfigured KG stack, so ``ingest_entities`` /
|
|
@@ -22,7 +22,7 @@ from __future__ import annotations
|
|
|
22
22
|
import logging
|
|
23
23
|
from typing import Any
|
|
24
24
|
|
|
25
|
-
from
|
|
25
|
+
from scion_sdk.ingest import (
|
|
26
26
|
ChangeSet,
|
|
27
27
|
Document,
|
|
28
28
|
Entity,
|
|
@@ -32,7 +32,7 @@ from agent_connector_sdk.ingest import (
|
|
|
32
32
|
Relationship,
|
|
33
33
|
current_ingest,
|
|
34
34
|
)
|
|
35
|
-
from
|
|
35
|
+
from scion_sdk.privacy import sanitize_for_persistence
|
|
36
36
|
|
|
37
37
|
logger = logging.getLogger("ciso_assistant_api.kg")
|
|
38
38
|
|
|
@@ -4,7 +4,7 @@ CONCEPT:AU-KG.ingest.list-durable-media. Evidence in a GRC program is only as go
|
|
|
4
4
|
its attached artifact (a scan, a signed policy PDF, an exported report). When a live
|
|
5
5
|
epistemic-graph engine is reachable, an evidence attachment's raw bytes are stored as a
|
|
6
6
|
content-addressed **blob** with a ``:MediaAsset`` graph node (carrying its evidence
|
|
7
|
-
metadata) in ONE cross-modal ACID commit, via ``
|
|
7
|
+
metadata) in ONE cross-modal ACID commit, via ``scion_sdk.ingest``'s
|
|
8
8
|
``ChangeSet(media=(MediaAsset(...),))`` + ``KnowledgeIngest.submit``.
|
|
9
9
|
|
|
10
10
|
Entirely best-effort and dependency-/engine-guarded: with no KG stack or no reachable
|
|
@@ -19,7 +19,7 @@ from __future__ import annotations
|
|
|
19
19
|
import logging
|
|
20
20
|
from typing import Any
|
|
21
21
|
|
|
22
|
-
from
|
|
22
|
+
from scion_sdk.ingest import (
|
|
23
23
|
ChangeSet,
|
|
24
24
|
IngestBinding,
|
|
25
25
|
IngestError,
|
|
@@ -4,12 +4,12 @@ import logging
|
|
|
4
4
|
import sys
|
|
5
5
|
from typing import Any, NamedTuple
|
|
6
6
|
|
|
7
|
-
from agent_connector_sdk.config import load_config, setting
|
|
8
|
-
from agent_connector_sdk.connector import build_server
|
|
9
|
-
from agent_connector_sdk.connector_identity import connector_version
|
|
10
|
-
from agent_connector_sdk.mcp.tool_surface import register_tool_surface
|
|
11
7
|
from fastmcp import FastMCP
|
|
12
8
|
from fastmcp.utilities.logging import get_logger
|
|
9
|
+
from scion_sdk.config import load_config, setting
|
|
10
|
+
from scion_sdk.connector import build_server
|
|
11
|
+
from scion_sdk.connector_identity import connector_version
|
|
12
|
+
from scion_sdk.mcp.tool_surface import register_tool_surface
|
|
13
13
|
|
|
14
14
|
from ciso_assistant_api.api._operation_manifest import OPERATIONS
|
|
15
15
|
from ciso_assistant_api.api_client import Api
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ontology/__init__.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Ciso Assistant ontology contribution (CONCEPT:AU-KG.ontology.federation-provider-leg).
|
|
2
2
|
|
|
3
3
|
Data-only subpackage: it carries ``ciso.ttl`` (the ``owl:Ontology``
|
|
4
|
-
``http://knuckles.team/kg/ciso`` module) which the
|
|
5
|
-
the ``
|
|
4
|
+
``http://knuckles.team/kg/ciso`` module) which the scion-sdk hub federates in via
|
|
5
|
+
the ``scion_sdk.ontology_providers`` entry-point. It holds no business logic
|
|
6
6
|
and no heavy imports so the hub can resolve it cheaply.
|
|
7
7
|
"""
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
rdfs:comment """CISO Assistant governance-risk-compliance model — risk assessments and
|
|
153
153
|
scenarios, applied controls, compliance audits and frameworks, threats,
|
|
154
154
|
vulnerabilities, incidents, assets and evidence — with their treatment, mitigation
|
|
155
|
-
and attestation relationships, federated into the
|
|
155
|
+
and attestation relationships, federated into the scion-sdk knowledge-graph
|
|
156
156
|
hub. Reuses the shared :Document / :Blob / :MediaAsset / :Person classes.""" .
|
|
157
157
|
|
|
158
158
|
# ontology-codemod R4
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ciso-assistant-api-development
|
|
3
|
+
skill_type: skill
|
|
4
|
+
description: >-
|
|
5
|
+
Develop and verify ciso-assistant-api as a connector-owned package while
|
|
6
|
+
preserving its generated CISO Assistant client, action-routed MCP tools,
|
|
7
|
+
SDK authentication boundary, packaged content, and spec-delivery contract.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# CISO Assistant API Development
|
|
11
|
+
|
|
12
|
+
Use this skill for changes to the `ciso-assistant-api` connector. The package
|
|
13
|
+
owns CISO Assistant API calls, mappings, MCP tools, and connector content; it
|
|
14
|
+
does not own the connector SDK, Arbora admission, the shared Pages renderer, or
|
|
15
|
+
Pipelines hooks.
|
|
16
|
+
|
|
17
|
+
## Repository map and runtime boundary
|
|
18
|
+
|
|
19
|
+
- `ciso_assistant_api/specs/*.json` are the vendored OpenAPI sources. The
|
|
20
|
+
generator emits the domain clients, operation manifest, and generated MCP
|
|
21
|
+
modules; change the generator or source spec before regenerating those files.
|
|
22
|
+
- `ciso_assistant_api/api_client.py` composes the generated API domains, while
|
|
23
|
+
`api/api_client_base.py`, `auth.py`, and `mcp/mcp_custom_api.py` contain the
|
|
24
|
+
hand-authored client, authentication, and custom surface. Preserve the SDK
|
|
25
|
+
`Connector` registration in `__init__.py`.
|
|
26
|
+
- `mcp_server.py` registers the action-routed generated tool domains, typed
|
|
27
|
+
verbose operations, opt-in KG ingestion, and prompts. Keep the
|
|
28
|
+
`MCP_TOOL_MODE` and `KG_INGESTTOOL` boundaries intact when changing tools.
|
|
29
|
+
- `ciso_assistant_api/ontology/`, `prompts/`, and `skills/` are packaged
|
|
30
|
+
connector content. The package-data table includes these trees; inspect a
|
|
31
|
+
built wheel when changing them.
|
|
32
|
+
- `auth.py` resolves `CISO_ASSISTANT_URL`, referenced credentials, delegation,
|
|
33
|
+
and the named CISO Assistant TLS profile. Keep secret values out of source,
|
|
34
|
+
tests, logs, and durable connector configuration.
|
|
35
|
+
|
|
36
|
+
## Rapid delivery: the 5-minute contract
|
|
37
|
+
|
|
38
|
+
1. Read the owning `specs/` row and this repository's `AGENTS.md` before
|
|
39
|
+
editing.
|
|
40
|
+
2. Inspect the active generated client or MCP registration path and its
|
|
41
|
+
focused tests before changing API behavior, auth, ontology content, or
|
|
42
|
+
packaged skills.
|
|
43
|
+
3. Prefer the smallest connector-owned change. Preserve generated-file
|
|
44
|
+
provenance, action names, parameter schemas, SDK `Connector` wiring, CISO
|
|
45
|
+
Assistant authentication, and package-data declarations.
|
|
46
|
+
4. Run focused tests through the narrow test-slot wrapper, then run the
|
|
47
|
+
repository pre-commit and pre-push gates without bypasses.
|
|
48
|
+
5. For public packaged content, update the patch version and `uv.lock`
|
|
49
|
+
together; inspect the built wheel for the new skill.
|
|
50
|
+
6. Treat Pages as a separate proof: after the exact main SHA has a successful
|
|
51
|
+
Pages run, check `/spec-delivery/`, its `index.html`, and `snapshot.json`
|
|
52
|
+
over HTTPS and record the revision from the snapshot.
|
|
53
|
+
|
|
54
|
+
## Focused development commands
|
|
55
|
+
|
|
56
|
+
From the repository root:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv sync --locked
|
|
60
|
+
|
|
61
|
+
/var/tmp/arbora-delivery/scale/run-narrow-test-slot.sh \
|
|
62
|
+
uv run --locked --extra test pytest -q \
|
|
63
|
+
tests/test_publication_workflow.py \
|
|
64
|
+
tests/test_default_content_surfaces.py \
|
|
65
|
+
tests/test_mcp_server.py
|
|
66
|
+
|
|
67
|
+
uvx pre-commit run --all-files
|
|
68
|
+
uvx pre-commit run --all-files --hook-stage pre-push
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
These checks cover the publication contract, packaged content, and MCP server
|
|
72
|
+
surface. Keep tests credential-free and do not replace them with a live CISO
|
|
73
|
+
Assistant call.
|
|
74
|
+
|
|
75
|
+
## Pages and package publication
|
|
76
|
+
|
|
77
|
+
`.github/workflows/pages.yml` is the one Pages caller. It invokes the shared
|
|
78
|
+
Pipelines `pages_pipeline.yml@main` workflow with the dashboard enabled and
|
|
79
|
+
keeps the docs, specs, dashboard configuration, and workflow path filters.
|
|
80
|
+
After a merge, verify the exact main SHA in the successful Pages run and probe:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
curl -fsSI https://knuckles-team.github.io/ciso-assistant-api/
|
|
84
|
+
curl -fsSI https://knuckles-team.github.io/ciso-assistant-api/spec-delivery/
|
|
85
|
+
curl -fsSI https://knuckles-team.github.io/ciso-assistant-api/spec-delivery/index.html
|
|
86
|
+
curl -fsS https://knuckles-team.github.io/ciso-assistant-api/spec-delivery/snapshot.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Keep package and container publication on their shared Pipelines workflows.
|
|
90
|
+
Inspect generated output and the built wheel before making a public release
|
|
91
|
+
claim; a local build does not prove Pages or registry publication.
|
|
92
|
+
|
|
93
|
+
## Change discipline
|
|
94
|
+
|
|
95
|
+
- Keep CISO Assistant API calls, request models, ontology mappings, and MCP
|
|
96
|
+
schemas under this repository's `CONN-CISO-ASSISTANT-API-*` boundary. The
|
|
97
|
+
connector SDK and shared Pipelines behavior belong to their owner repositories.
|
|
98
|
+
- Do not hand-edit generated API clients, operation manifests, or generated MCP
|
|
99
|
+
modules. Use `scripts/generate_from_openapi.py` and inspect the resulting diff.
|
|
100
|
+
- Use `CISO_ASSISTANT_TOKEN_REF` or the username/password reference settings
|
|
101
|
+
only through the runtime credential boundary. Preserve TLS verification and
|
|
102
|
+
the named profile path.
|
|
103
|
+
- Keep KG ingestion opt-in and preserve its privacy, tenant, provenance, and
|
|
104
|
+
attachment policy. Do not claim graph persistence from a local mock.
|
|
105
|
+
- For mutations, inspect current state first and require operator approval
|
|
106
|
+
where the existing connector procedure calls for it.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ciso-assistant-api
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.9
|
|
4
4
|
Summary: CISO Assistant API + MCP Server — 100% API coverage
|
|
5
5
|
Author: Knuckles-Team
|
|
6
6
|
License: MIT
|
|
@@ -12,13 +12,13 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: <3.15,>=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
15
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3
|
|
16
16
|
Requires-Dist: python-dotenv>=1.2.4
|
|
17
17
|
Requires-Dist: requests>=2.34.2
|
|
18
18
|
Provides-Extra: mcp
|
|
19
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
19
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3; extra == "mcp"
|
|
20
20
|
Provides-Extra: all
|
|
21
|
-
Requires-Dist: scion-sdk[mcp]<
|
|
21
|
+
Requires-Dist: scion-sdk[mcp]<0.7.0,>=0.6.3; extra == "all"
|
|
22
22
|
Provides-Extra: test
|
|
23
23
|
Requires-Dist: pytest-xdist>=3.8.0; extra == "test"
|
|
24
24
|
Requires-Dist: pytest>=9.1.1; extra == "test"
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/SOURCES.txt
RENAMED
|
@@ -73,6 +73,7 @@ ciso_assistant_api/ontology/shapes/connector.shacl.ttl
|
|
|
73
73
|
ciso_assistant_api/prompts/__init__.py
|
|
74
74
|
ciso_assistant_api/prompts/grc_specialist.json
|
|
75
75
|
ciso_assistant_api/skills/__init__.py
|
|
76
|
+
ciso_assistant_api/skills/ciso-assistant-api-development/SKILL.md
|
|
76
77
|
ciso_assistant_api/skills/ciso-assistant-compliance-audit/SKILL.md
|
|
77
78
|
ciso_assistant_api/skills/ciso-assistant-incident-evidence/SKILL.md
|
|
78
79
|
ciso_assistant_api/skills/ciso-assistant-operations/SKILL.md
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/entry_points.txt
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
[
|
|
1
|
+
[console_scripts]
|
|
2
|
+
ciso-assistant-mcp = ciso_assistant_api.mcp_server:mcp_server
|
|
3
|
+
|
|
4
|
+
[scion_sdk.connector]
|
|
2
5
|
ciso-assistant-mcp = ciso_assistant_api:connector
|
|
3
6
|
|
|
4
|
-
[
|
|
7
|
+
[scion_sdk.prompt_providers]
|
|
5
8
|
ciso-assistant-api = ciso_assistant_api.prompts
|
|
6
|
-
|
|
7
|
-
[console_scripts]
|
|
8
|
-
ciso-assistant-mcp = ciso_assistant_api.mcp_server:mcp_server
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/requires.txt
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
scion-sdk[mcp]<
|
|
1
|
+
scion-sdk[mcp]<0.7.0,>=0.6.3
|
|
2
2
|
python-dotenv>=1.2.4
|
|
3
3
|
requests>=2.34.2
|
|
4
4
|
|
|
5
5
|
[all]
|
|
6
|
-
scion-sdk[mcp]<
|
|
6
|
+
scion-sdk[mcp]<0.7.0,>=0.6.3
|
|
7
7
|
|
|
8
8
|
[mcp]
|
|
9
|
-
scion-sdk[mcp]<
|
|
9
|
+
scion-sdk[mcp]<0.7.0,>=0.6.3
|
|
10
10
|
|
|
11
11
|
[test]
|
|
12
12
|
pytest-xdist>=3.8.0
|
|
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ciso-assistant-api"
|
|
7
|
-
version = "2.3.
|
|
7
|
+
version = "2.3.9"
|
|
8
8
|
description = "CISO Assistant API + MCP Server — 100% API coverage"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
classifiers = [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
11
11
|
requires-python = ">=3.12, <3.15"
|
|
12
|
-
dependencies = [ "scion-sdk[mcp]>=0.
|
|
12
|
+
dependencies = [ "scion-sdk[mcp]>=0.6.3,<0.7.0", "python-dotenv>=1.2.4", "requests>=2.34.2",]
|
|
13
13
|
[[project.authors]]
|
|
14
14
|
name = "Knuckles-Team"
|
|
15
15
|
|
|
@@ -17,8 +17,8 @@ name = "Knuckles-Team"
|
|
|
17
17
|
text = "MIT"
|
|
18
18
|
|
|
19
19
|
[project.optional-dependencies]
|
|
20
|
-
mcp = [ "scion-sdk[mcp]>=0.
|
|
21
|
-
all = [ "scion-sdk[mcp]>=0.
|
|
20
|
+
mcp = [ "scion-sdk[mcp]>=0.6.3,<0.7.0",]
|
|
21
|
+
all = [ "scion-sdk[mcp]>=0.6.3,<0.7.0",]
|
|
22
22
|
test = [
|
|
23
23
|
"pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
|
|
24
24
|
|
|
@@ -27,11 +27,11 @@ ciso-assistant-mcp = "ciso_assistant_api.mcp_server:mcp_server"
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
[project.entry-points."
|
|
30
|
+
[project.entry-points."scion_sdk.prompt_providers"]
|
|
31
31
|
ciso-assistant-api = "ciso_assistant_api.prompts"
|
|
32
32
|
|
|
33
|
-
# The one declared connector identity: the fleet name (
|
|
34
|
-
[project.entry-points."
|
|
33
|
+
# The one declared connector identity: the fleet name (SCION-CONNECTOR-CONTROL-R071).
|
|
34
|
+
[project.entry-points."scion_sdk.connector"]
|
|
35
35
|
ciso-assistant-mcp = "ciso_assistant_api:connector"
|
|
36
36
|
|
|
37
37
|
[tool.uv.workspace]
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/tests/test_default_content_surfaces.py
RENAMED
|
@@ -70,10 +70,10 @@ def test_production_pack_binds_packaged_ontology_and_shapes():
|
|
|
70
70
|
import hashlib
|
|
71
71
|
from importlib.metadata import version
|
|
72
72
|
|
|
73
|
-
from
|
|
74
|
-
from
|
|
75
|
-
from
|
|
76
|
-
from
|
|
73
|
+
from scion_sdk.artifacts.pack import build_content_pack
|
|
74
|
+
from scion_sdk.artifacts.resources import ResourceArtifactKind
|
|
75
|
+
from scion_sdk.ports.session import TransportEndpoint
|
|
76
|
+
from scion_sdk.transports.mcp import McpTransport
|
|
77
77
|
|
|
78
78
|
async def capture():
|
|
79
79
|
async with McpTransport().session(
|
|
@@ -106,5 +106,5 @@ def test_public_sdk_floor_supports_the_served_descriptor_protocol():
|
|
|
106
106
|
]
|
|
107
107
|
assert requirements
|
|
108
108
|
for requirement in requirements:
|
|
109
|
-
assert requirement.specifier.contains("0.
|
|
110
|
-
assert not requirement.specifier.contains("0.5.
|
|
109
|
+
assert requirement.specifier.contains("0.6.3")
|
|
110
|
+
assert not requirement.specifier.contains("0.5.9")
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
-
from agent_connector_sdk.connector_identity import connector_name
|
|
6
5
|
import ast
|
|
7
|
-
import tomllib
|
|
8
6
|
from pathlib import Path
|
|
9
7
|
|
|
10
8
|
import pytest
|
|
9
|
+
import tomllib
|
|
10
|
+
from scion_sdk.connector_identity import connector_name
|
|
11
11
|
|
|
12
12
|
ROOT = Path(__file__).resolve().parents[1]
|
|
13
13
|
PACKAGE = ROOT / "ciso_assistant_api"
|
|
@@ -34,7 +34,7 @@ def _call_connectors(path: Path) -> list[str]:
|
|
|
34
34
|
@pytest.mark.spec("CONN-CISO-ASSISTANT-API-R004")
|
|
35
35
|
def test_connector_name_is_the_fleet_name() -> None:
|
|
36
36
|
pyproject = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
|
|
37
|
-
assert pyproject["project"]["entry-points"]["
|
|
37
|
+
assert pyproject["project"]["entry-points"]["scion_sdk.connector"] == {
|
|
38
38
|
FLEET: "ciso_assistant_api:connector"
|
|
39
39
|
}
|
|
40
40
|
assert connector_name("ciso_assistant_api") == FLEET
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""Epistemic-graph typed-node ingestion — Wire-First coverage.
|
|
2
2
|
|
|
3
3
|
Exercises the real ``ingest_entities`` / ``ingest_documents`` seam and the CISO
|
|
4
|
-
Assistant record → typed-node mappers against a fake ``
|
|
4
|
+
Assistant record → typed-node mappers against a fake ``scion_sdk.ingest``
|
|
5
5
|
transport (no engine required), asserting the committed records/relationships and
|
|
6
6
|
the class/id mapping. CONCEPT:AU-KG.ingest.enterprise-source-extractor.
|
|
7
7
|
|
|
@@ -17,8 +17,8 @@ from types import SimpleNamespace
|
|
|
17
17
|
from typing import Any
|
|
18
18
|
|
|
19
19
|
import pytest
|
|
20
|
-
from agent_connector_sdk.ingest import KnowledgeIngest
|
|
21
20
|
from epistemic_graph.generated.source_ingestion import SourceIngestionRequest
|
|
21
|
+
from scion_sdk.ingest import KnowledgeIngest
|
|
22
22
|
|
|
23
23
|
from ciso_assistant_api.kg_ingest import (
|
|
24
24
|
ingest_applied_controls,
|
|
@@ -41,7 +41,9 @@ class _FakeTransport:
|
|
|
41
41
|
self.requests: list[SourceIngestionRequest] = []
|
|
42
42
|
|
|
43
43
|
async def source_status(self, _connector: str, _stream: str) -> Any:
|
|
44
|
-
return SimpleNamespace(
|
|
44
|
+
return SimpleNamespace(
|
|
45
|
+
connector=_connector, stream=_stream, accepted_checkpoint=None
|
|
46
|
+
)
|
|
45
47
|
|
|
46
48
|
async def submit(self, request: SourceIngestionRequest) -> Any:
|
|
47
49
|
self.requests.append(request)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Epistemic-graph blob ingestion for evidence attachments — Wire-First coverage.
|
|
2
2
|
|
|
3
|
-
Exercises ``ingest_evidence_attachment`` against a fake ``
|
|
3
|
+
Exercises ``ingest_evidence_attachment`` against a fake ``scion_sdk.ingest``
|
|
4
4
|
transport (no engine required), asserting the stored media asset's bytes, mime type,
|
|
5
5
|
evidence provenance, and that missing bytes / absent policy approval / no reachable
|
|
6
6
|
engine all no-op cleanly. CONCEPT:AU-KG.ingest.list-durable-media.
|
|
@@ -12,7 +12,7 @@ from types import SimpleNamespace
|
|
|
12
12
|
from typing import Any
|
|
13
13
|
|
|
14
14
|
import pytest
|
|
15
|
-
from
|
|
15
|
+
from scion_sdk.ingest import KnowledgeIngest
|
|
16
16
|
|
|
17
17
|
from ciso_assistant_api.kg_media import ingest_evidence_attachment
|
|
18
18
|
|
|
@@ -23,7 +23,9 @@ class _FakeTransport:
|
|
|
23
23
|
self.requests: list[Any] = []
|
|
24
24
|
|
|
25
25
|
async def source_status(self, _connector: str, _stream: str) -> Any:
|
|
26
|
-
return SimpleNamespace(
|
|
26
|
+
return SimpleNamespace(
|
|
27
|
+
connector=_connector, stream=_stream, accepted_checkpoint=None
|
|
28
|
+
)
|
|
27
29
|
|
|
28
30
|
async def store_blob(self, data: bytes) -> str:
|
|
29
31
|
self.stored_blobs.append(data)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Keep docs pushes separate from guarded package publication."""
|
|
2
|
+
|
|
3
|
+
from fnmatch import fnmatchcase
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
import yaml
|
|
7
|
+
|
|
8
|
+
ROOT = Path(__file__).resolve().parents[1]
|
|
9
|
+
CONTRACT = "main"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _workflow(name):
|
|
13
|
+
return yaml.safe_load((ROOT / ".github/workflows" / name).read_text())
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _push_matches(workflow, ref):
|
|
17
|
+
# PyYAML's YAML 1.1 reader represents the Actions "on" key as True.
|
|
18
|
+
push = workflow[True]["push"]
|
|
19
|
+
kind, name = ref.removeprefix("refs/").split("/", 1)
|
|
20
|
+
filters = push.get({"heads": "branches", "tags": "tags"}[kind], [])
|
|
21
|
+
return any(fnmatchcase(name, pattern) for pattern in filters)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_release_hook_inherits_catalogue_policy():
|
|
25
|
+
config = yaml.safe_load((ROOT / ".pre-commit-config.yaml").read_text())
|
|
26
|
+
matches = [
|
|
27
|
+
(repo, hook)
|
|
28
|
+
for repo in config["repos"]
|
|
29
|
+
for hook in repo["hooks"]
|
|
30
|
+
if hook["id"] == "dependency-readiness"
|
|
31
|
+
]
|
|
32
|
+
assert len(matches) == 1
|
|
33
|
+
repo, hook = matches[0]
|
|
34
|
+
assert repo["repo"] == "https://github.com/Knuckles-Team/pipelines"
|
|
35
|
+
assert repo["rev"] == CONTRACT
|
|
36
|
+
assert hook == {"id": "dependency-readiness"}
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def test_spec_delivery_uses_canonical_aggregate_and_development_skill():
|
|
40
|
+
config = yaml.safe_load((ROOT / ".pre-commit-config.yaml").read_text())
|
|
41
|
+
pipelines = next(
|
|
42
|
+
repo
|
|
43
|
+
for repo in config["repos"]
|
|
44
|
+
if repo["repo"] == "https://github.com/Knuckles-Team/pipelines"
|
|
45
|
+
)
|
|
46
|
+
assert pipelines["rev"] == CONTRACT
|
|
47
|
+
assert [hook["id"] for hook in pipelines["hooks"]].count("spec") == 1
|
|
48
|
+
|
|
49
|
+
skill = (
|
|
50
|
+
ROOT / "ciso_assistant_api/skills/ciso-assistant-api-development/SKILL.md"
|
|
51
|
+
).read_text()
|
|
52
|
+
assert "name: ciso-assistant-api-development" in skill
|
|
53
|
+
assert "## Rapid delivery: the 5-minute contract" in skill
|
|
@@ -26,7 +26,7 @@ def test_client_constructs_with_token():
|
|
|
26
26
|
|
|
27
27
|
def test_client_requires_credentials():
|
|
28
28
|
import pytest
|
|
29
|
-
from
|
|
29
|
+
from scion_sdk.exceptions import MissingParameterError
|
|
30
30
|
|
|
31
31
|
from ciso_assistant_api.api_client import Api
|
|
32
32
|
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"""Keep docs pushes separate from guarded package publication."""
|
|
2
|
-
|
|
3
|
-
from fnmatch import fnmatchcase
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
import pytest
|
|
7
|
-
import yaml
|
|
8
|
-
|
|
9
|
-
ROOT = Path(__file__).resolve().parents[1]
|
|
10
|
-
CONTRACT = "main"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def _workflow(name):
|
|
14
|
-
return yaml.safe_load((ROOT / ".github/workflows" / name).read_text())
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
def _push_matches(workflow, ref):
|
|
18
|
-
# PyYAML's YAML 1.1 reader represents the Actions "on" key as True.
|
|
19
|
-
push = workflow[True]["push"]
|
|
20
|
-
kind, name = ref.removeprefix("refs/").split("/", 1)
|
|
21
|
-
filters = push.get({"heads": "branches", "tags": "tags"}[kind], [])
|
|
22
|
-
return any(fnmatchcase(name, pattern) for pattern in filters)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
@pytest.mark.parametrize(
|
|
26
|
-
"ref, expected",
|
|
27
|
-
[
|
|
28
|
-
("refs/heads/main", True),
|
|
29
|
-
("refs/heads/docs-update", False),
|
|
30
|
-
("refs/tags/v2.1.0", False),
|
|
31
|
-
],
|
|
32
|
-
)
|
|
33
|
-
def test_only_main_starts_package_publication(ref, expected):
|
|
34
|
-
assert _push_matches(_workflow("pipeline.yml"), ref) is expected
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
def test_each_package_publisher_uses_the_shared_pipelines():
|
|
38
|
-
jobs = _workflow("pipeline.yml")["jobs"]
|
|
39
|
-
assert set(jobs) == {"publish-pypi"}
|
|
40
|
-
assert jobs["publish-pypi"]["uses"].endswith("/python_pipeline.yml@main")
|
|
41
|
-
assert _workflow("pipeline.yml")[True]["push"]["paths-ignore"] == [
|
|
42
|
-
"docker/Dockerfile",
|
|
43
|
-
".bumpversion.cfg",
|
|
44
|
-
]
|
|
45
|
-
container = _workflow("container-release.yml")
|
|
46
|
-
assert container[True]["push"] == {
|
|
47
|
-
"branches": ["main"],
|
|
48
|
-
"paths": ["docker/Dockerfile"],
|
|
49
|
-
}
|
|
50
|
-
assert container["jobs"]["publish-docker"]["needs"] == "verify-public-wheel"
|
|
51
|
-
assert container["jobs"]["publish-docker"]["uses"].endswith(
|
|
52
|
-
"/container_pipeline.yml@main"
|
|
53
|
-
)
|
|
54
|
-
for publisher in (jobs["publish-pypi"], container["jobs"]["publish-docker"]):
|
|
55
|
-
assert "if" not in publisher
|
|
56
|
-
assert not publisher.get("continue-on-error", False)
|
|
57
|
-
guard = container["jobs"]["verify-public-wheel"]["steps"][-1]
|
|
58
|
-
assert guard["with"] == {
|
|
59
|
-
"mode": "published-wheel",
|
|
60
|
-
"distribution": "ciso-assistant-api",
|
|
61
|
-
"module": "ciso_assistant_api",
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
def test_pages_keeps_shared_main_and_spec_triggers():
|
|
66
|
-
workflow = _workflow("pages.yml")
|
|
67
|
-
publisher = workflow["jobs"]["publish-pages"]
|
|
68
|
-
assert publisher["uses"].endswith("/pages_pipeline.yml@main")
|
|
69
|
-
assert publisher["with"]["spec_dashboard_enabled"] is True
|
|
70
|
-
assert "specs/**" in workflow[True]["push"]["paths"]
|
|
71
|
-
assert ".github/spec-dashboard.json" in workflow[True]["push"]["paths"]
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
def test_release_hook_inherits_catalogue_policy():
|
|
75
|
-
config = yaml.safe_load((ROOT / ".pre-commit-config.yaml").read_text())
|
|
76
|
-
matches = [
|
|
77
|
-
(repo, hook)
|
|
78
|
-
for repo in config["repos"]
|
|
79
|
-
for hook in repo["hooks"]
|
|
80
|
-
if hook["id"] == "dependency-readiness"
|
|
81
|
-
]
|
|
82
|
-
assert len(matches) == 1
|
|
83
|
-
repo, hook = matches[0]
|
|
84
|
-
assert repo["repo"] == "https://github.com/Knuckles-Team/pipelines"
|
|
85
|
-
assert repo["rev"] == CONTRACT
|
|
86
|
-
assert hook == {"id": "dependency-readiness"}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
@pytest.mark.parametrize(
|
|
90
|
-
"path, expected",
|
|
91
|
-
[
|
|
92
|
-
("docker/Dockerfile", False),
|
|
93
|
-
(".bumpversion.cfg", False),
|
|
94
|
-
("pyproject.toml", True),
|
|
95
|
-
("uv.lock", True),
|
|
96
|
-
("ciso_assistant_api/mcp_server.py", True),
|
|
97
|
-
("README.md", True),
|
|
98
|
-
(".github/workflows/pipeline.yml", True),
|
|
99
|
-
],
|
|
100
|
-
)
|
|
101
|
-
def test_package_publication_skips_only_container_pin_refresh(path, expected):
|
|
102
|
-
ignores = _workflow("pipeline.yml")[True]["push"]["paths-ignore"]
|
|
103
|
-
assert (not any(fnmatchcase(path, pattern) for pattern in ignores)) is expected
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/_operation_manifest.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_assets.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_chat.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_crq.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_ebios_rm.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_evidence.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_incidents.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_privacy.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/api/api_client_settings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/ciso_assistant_models.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/connectors/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_auth_users.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_compliance.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_custom_api.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_ebios_rm.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_evidence.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_governance.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_incidents.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_integrations.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_kg_ingest.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_resilience.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_risk_management.py
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_settings.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_tasks_timeline.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/mcp/mcp_third_party.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/prompts/__init__.py
RENAMED
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/prompts/grc_specialist.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api/specs/ciso_assistant.json
RENAMED
|
File without changes
|
|
File without changes
|
{ciso_assistant_api-2.3.7 → ciso_assistant_api-2.3.9}/ciso_assistant_api.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|