security(docs): hide runtime provider failures from users
This commit is contained in:
@@ -113,7 +113,7 @@ def docs_context(
|
||||
},
|
||||
"evidence": {
|
||||
"optional_modules": optional_modules,
|
||||
"sources": _evidence_sources(),
|
||||
"sources": _evidence_sources() if documentation_type == "admin" else [],
|
||||
"documentation": documentation_layers["evidence"],
|
||||
},
|
||||
},
|
||||
@@ -356,6 +356,8 @@ def _collect_documentation_topics(
|
||||
try:
|
||||
provided_topics = tuple(provider(context))
|
||||
except Exception as exc:
|
||||
if documentation_type != "admin":
|
||||
continue
|
||||
provided_topics = (
|
||||
DocumentationTopic(
|
||||
id=f"{manifest.id}.runtime-documentation-unavailable",
|
||||
|
||||
Reference in New Issue
Block a user