Skip to content

Commit 27ad06d

Browse files
committed
feat(connector-linter): add VC3xx code checks
1 parent f8c5e15 commit 27ad06d

25 files changed

Lines changed: 4002 additions & 0 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""VC3xx — Code quality checks.
2+
3+
VC301: Connector must define an author identity.
4+
VC302: Author must be referenced on STIX entities (created_by_ref).
5+
VC303: CONNECTOR_TYPE must be defined in application code, not read from env.
6+
VC304: Ensure TLP markings are checked (check_max_tlp).
7+
VC305: Connector must implement Base Settings from connectors-sdk.
8+
VC306: Connector log level should default to 'error'.
9+
VC307: Except blocks should use error/warning logging, not debug/info.
10+
VC308: Main entry point must use traceback for error handling.
11+
VC309: Connector must use only absolute imports, no relative imports.
12+
VC310: External references must not be added by default to non-Identity objects.
13+
VC311: Connector should use TLP markings on entities with appropriate level.
14+
VC312: send_stix2_bundle must use cleanup_inconsistent_bundle=True.
15+
VC313: STIX SDO/SRO objects must use pycti.XXX.generate_id() for deterministic IDs.
16+
VC314: External-import connectors must use schedule_process or schedule_iso.
17+
VC315: Connector must call initiate_work before processing.
18+
VC316: Connector must close work with to_processed after processing.
19+
VC317: initiate_work should only be called when data is available.
20+
VC318: Internal-enrichment connectors must use helper.listen().
21+
VC319: Enrichment connector must return original bundle when not in scope.
22+
VC320: Enrichment connector must enforce TLP access control.
23+
VC321: Enrichment connector must be playbook-compatible.
24+
VC322: Enrichment connector must read data['stix_objects'] (former bundle).
25+
VC323: Stream connectors must use helper.listen_stream().
26+
VC324: Relationship should not set both start_time and stop_time.
27+
"""

0 commit comments

Comments
 (0)