@terpjs/spec 0.14.0 → 0.15.0
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.
- package/LICENSE +201 -201
- package/README.md +417 -417
- package/VERSION +1 -1
- package/app-check-report.schema.json +122 -122
- package/assurance-profile.schema.json +70 -70
- package/catalog/backend/alembic_downgrades_not_empty.json +22 -22
- package/catalog/backend/base_query_not_overridden.json +27 -27
- package/catalog/backend/canonical_module_shape.json +22 -22
- package/catalog/backend/datetime_columns_are_timezone_aware.json +23 -23
- package/catalog/backend/escape_hatch_budget.json +21 -21
- package/catalog/backend/events_reference_catalog.json +27 -27
- package/catalog/backend/input_schemas_exclude_managed_columns.json +27 -27
- package/catalog/backend/input_str_fields_have_max_length.json +22 -22
- package/catalog/backend/jobs_reference_catalog.json +27 -27
- package/catalog/backend/list_routes_paginate.json +32 -32
- package/catalog/backend/modules_declare_policy.json +26 -26
- package/catalog/backend/mutations_emit_audit.json +26 -26
- package/catalog/backend/mutations_require_write_role.json +32 -32
- package/catalog/backend/no_adhoc_background_runtime.json +22 -22
- package/catalog/backend/no_adhoc_config_decrypt.json +27 -27
- package/catalog/backend/no_adhoc_logging_config.json +22 -22
- package/catalog/backend/no_adhoc_middleware.json +27 -27
- package/catalog/backend/no_adhoc_permission_literals.json +27 -27
- package/catalog/backend/no_app_instantiation.json +22 -22
- package/catalog/backend/no_blocking_sleep.json +22 -22
- package/catalog/backend/no_cross_module_imports.json +21 -21
- package/catalog/backend/no_dependency_overrides.json +27 -27
- package/catalog/backend/no_destructive_migrations.json +22 -22
- package/catalog/backend/no_dynamic_sql.json +22 -22
- package/catalog/backend/no_empty_tests.json +22 -22
- package/catalog/backend/no_eval_or_exec.json +22 -22
- package/catalog/backend/no_hardcoded_credentials.json +21 -21
- package/catalog/backend/no_internal_imports.json +22 -22
- package/catalog/backend/no_manual_actor_stamping.json +27 -27
- package/catalog/backend/no_manual_ownership_checks.json +32 -32
- package/catalog/backend/no_manual_scope_filtering.json +27 -27
- package/catalog/backend/no_manual_table_schema.json +22 -22
- package/catalog/backend/no_manual_version_assignment.json +22 -22
- package/catalog/backend/no_mutable_default_args.json +22 -22
- package/catalog/backend/no_naive_datetime.json +22 -22
- package/catalog/backend/no_oversized_python_files.json +22 -22
- package/catalog/backend/no_print.json +22 -22
- package/catalog/backend/no_raw_app_routes.json +26 -26
- package/catalog/backend/no_raw_connection_access.json +27 -27
- package/catalog/backend/no_raw_file_references.json +27 -27
- package/catalog/backend/no_raw_outbound_http.json +22 -22
- package/catalog/backend/no_raw_session_construction.json +22 -22
- package/catalog/backend/no_star_imports.json +22 -22
- package/catalog/backend/no_todo_fixme.json +22 -22
- package/catalog/backend/no_unique_columns_on_soft_delete_models.json +22 -22
- package/catalog/backend/offset_queries_declare_ordering.json +22 -22
- package/catalog/backend/path_id_params_are_uuid.json +22 -22
- package/catalog/backend/policy_refs_resolve.json +27 -27
- package/catalog/backend/public_modules_are_read_only.json +26 -26
- package/catalog/backend/reads_use_base_query.json +27 -27
- package/catalog/backend/response_model_not_table_model.json +27 -27
- package/catalog/backend/routes_declare_response_model.json +27 -27
- package/catalog/backend/safe_methods_are_read_only.json +31 -31
- package/catalog/backend/schemas_exclude_sensitive_fields.json +32 -32
- package/catalog/backend/session_imported_from_sqlmodel.json +22 -22
- package/catalog/backend/table_models_use_base_table.json +22 -22
- package/catalog/backend/tables_have_migrations.json +27 -27
- package/catalog/backend/tenant_scoped_models_use_scoped_service.json +22 -22
- package/catalog/backend/ungoverned_escape_hatch.json +21 -21
- package/catalog/backend/update_schemas_inherit_base_update_schema.json +32 -32
- package/catalog/frontend/escape-hatch.json +21 -21
- package/catalog/frontend/generated-client-only.json +26 -26
- package/catalog/frontend/layout-contract.json +26 -26
- package/catalog/frontend/no-cross-module-imports.json +21 -21
- package/catalog/frontend/no-deep-imports.json +25 -25
- package/catalog/frontend/no-dom-html-injection.json +22 -22
- package/catalog/frontend/no-eval.json +21 -21
- package/catalog/frontend/no-inline-styling.json +25 -25
- package/catalog/frontend/no-style-imports.json +24 -24
- package/catalog/frontend/no-unsafe-href.json +21 -21
- package/catalog/frontend/no-unsafe-target-blank.json +21 -21
- package/catalog/frontend/router-links.json +22 -22
- package/catalog/frontend/token-styled-elements.json +25 -25
- package/catalog/schema.json +95 -95
- package/corpus/PENDING.json +4 -4
- package/corpus/RESIDUALS.json +21 -21
- package/corpus/backend/alembic_downgrades_not_empty/compliant-01/modules/notes/migrations/versions/0001_change.py +6 -6
- package/corpus/backend/alembic_downgrades_not_empty/violation-01/modules/notes/migrations/versions/0001_change.py +6 -6
- package/corpus/backend/base_query_not_overridden/compliant-01/modules/notes/service.py +8 -8
- package/corpus/backend/base_query_not_overridden/compliant-02/modules/notes/service.py +8 -8
- package/corpus/backend/base_query_not_overridden/violation-01/modules/notes/service.py +8 -8
- package/corpus/backend/base_query_not_overridden/violation-02/expected-findings.json +7 -7
- package/corpus/backend/base_query_not_overridden/violation-02/modules/notes/service.py +8 -8
- package/corpus/backend/canonical_module_shape/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/canonical_module_shape/compliant-01/modules/notes/module.py +7 -7
- package/corpus/backend/canonical_module_shape/compliant-01/modules/notes/router.py +3 -3
- package/corpus/backend/canonical_module_shape/compliant-01/modules/notes/schemas.py +10 -10
- package/corpus/backend/canonical_module_shape/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/canonical_module_shape/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/datetime_columns_are_timezone_aware/compliant-01/modules/notes/models.py +12 -12
- package/corpus/backend/datetime_columns_are_timezone_aware/violation-01/modules/notes/models.py +12 -12
- package/corpus/backend/datetime_columns_are_timezone_aware/violation-02/modules/notes/models.py +13 -13
- package/corpus/backend/datetime_columns_are_timezone_aware/violation-03/modules/notes/models.py +15 -15
- package/corpus/backend/escape_hatch_budget/compliant-01/escape-hatch-budget.json +3 -3
- package/corpus/backend/escape_hatch_budget/compliant-01/modules/notes/service.py +2 -2
- package/corpus/backend/escape_hatch_budget/compliant-02/escape-hatch-budget.json +1 -1
- package/corpus/backend/escape_hatch_budget/compliant-02/modules/notes/service.py +4 -4
- package/corpus/backend/escape_hatch_budget/violation-01/escape-hatch-budget.json +1 -1
- package/corpus/backend/escape_hatch_budget/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/escape_hatch_budget/violation-02/escape-hatch-budget.json +3 -3
- package/corpus/backend/escape_hatch_budget/violation-02/modules/notes/service.py +4 -4
- package/corpus/backend/events_reference_catalog/compliant-01/modules/notes/module.py +9 -9
- package/corpus/backend/events_reference_catalog/violation-01/modules/notes/module.py +8 -8
- package/corpus/backend/input_schemas_exclude_managed_columns/compliant-01/modules/notes/schemas.py +6 -6
- package/corpus/backend/input_schemas_exclude_managed_columns/violation-01/expected-findings.json +7 -7
- package/corpus/backend/input_schemas_exclude_managed_columns/violation-01/modules/notes/schemas.py +9 -9
- package/corpus/backend/input_schemas_exclude_managed_columns/violation-02/expected-findings.json +12 -12
- package/corpus/backend/input_schemas_exclude_managed_columns/violation-02/modules/notes/router.py +14 -14
- package/corpus/backend/input_str_fields_have_max_length/compliant-01/modules/notes/schemas.py +4 -4
- package/corpus/backend/input_str_fields_have_max_length/violation-01/modules/notes/schemas.py +2 -2
- package/corpus/backend/jobs_reference_catalog/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/jobs_reference_catalog/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/list_routes_paginate/compliant-01/modules/notes/router.py +6 -6
- package/corpus/backend/list_routes_paginate/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/modules_declare_policy/compliant-01/modules/notes/module.py +7 -7
- package/corpus/backend/modules_declare_policy/violation-01/modules/notes/module.py +6 -6
- package/corpus/backend/mutations_emit_audit/compliant-01/modules/notes/service.py +9 -9
- package/corpus/backend/mutations_emit_audit/violation-01/modules/notes/service.py +4 -4
- package/corpus/backend/mutations_require_write_role/compliant-01/modules/notes/module.py +7 -7
- package/corpus/backend/mutations_require_write_role/compliant-01/modules/notes/router.py +3 -3
- package/corpus/backend/mutations_require_write_role/compliant-02/modules/notes/module.py +7 -7
- package/corpus/backend/mutations_require_write_role/compliant-02/modules/notes/router.py +3 -3
- package/corpus/backend/mutations_require_write_role/violation-01/expected-findings.json +7 -7
- package/corpus/backend/mutations_require_write_role/violation-01/modules/notes/module.py +7 -7
- package/corpus/backend/mutations_require_write_role/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/mutations_require_write_role/violation-02/expected-findings.json +7 -7
- package/corpus/backend/mutations_require_write_role/violation-02/modules/notes/module.py +7 -7
- package/corpus/backend/mutations_require_write_role/violation-02/modules/notes/router.py +5 -5
- package/corpus/backend/mutations_require_write_role/violation-03/expected-findings.json +7 -7
- package/corpus/backend/mutations_require_write_role/violation-03/modules/notes/module.py +10 -10
- package/corpus/backend/mutations_require_write_role/violation-03/modules/notes/router.py +3 -3
- package/corpus/backend/no_adhoc_background_runtime/compliant-01/modules/notes/service.py +9 -9
- package/corpus/backend/no_adhoc_background_runtime/violation-01/modules/notes/service.py +5 -5
- package/corpus/backend/no_adhoc_background_runtime/violation-02/modules/notes/service.py +3 -3
- package/corpus/backend/no_adhoc_config_decrypt/compliant-01/modules/billing/service.py +2 -2
- package/corpus/backend/no_adhoc_config_decrypt/violation-01/modules/billing/service.py +2 -2
- package/corpus/backend/no_adhoc_logging_config/compliant-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_adhoc_logging_config/violation-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_adhoc_middleware/compliant-01/main.py +3 -3
- package/corpus/backend/no_adhoc_middleware/violation-01/main.py +4 -4
- package/corpus/backend/no_adhoc_middleware/violation-02/main.py +5 -5
- package/corpus/backend/no_adhoc_permission_literals/compliant-01/modules/notes/module.py +3 -3
- package/corpus/backend/no_adhoc_permission_literals/compliant-02/modules/notes/router.py +5 -5
- package/corpus/backend/no_adhoc_permission_literals/violation-01/expected-findings.json +7 -7
- package/corpus/backend/no_adhoc_permission_literals/violation-01/modules/notes/module.py +1 -1
- package/corpus/backend/no_adhoc_permission_literals/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_adhoc_permission_literals/violation-02/modules/notes/router.py +2 -2
- package/corpus/backend/no_adhoc_permission_literals/violation-03/expected-findings.json +12 -12
- package/corpus/backend/no_adhoc_permission_literals/violation-03/modules/notes/module.py +10 -10
- package/corpus/backend/no_app_instantiation/compliant-01/main.py +3 -3
- package/corpus/backend/no_app_instantiation/violation-01/main.py +3 -3
- package/corpus/backend/no_blocking_sleep/compliant-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_blocking_sleep/violation-01/modules/notes/service.py +5 -5
- package/corpus/backend/no_cross_module_imports/compliant-01/modules/a/service.py +1 -1
- package/corpus/backend/no_cross_module_imports/violation-01/modules/a/service.py +1 -1
- package/corpus/backend/no_cross_module_imports/violation-02/modules/a/service.py +1 -1
- package/corpus/backend/no_dependency_overrides/compliant-01/main.py +12 -12
- package/corpus/backend/no_dependency_overrides/violation-01/main.py +11 -11
- package/corpus/backend/no_destructive_migrations/compliant-01/modules/notes/migrations/versions/0001_change.py +3 -3
- package/corpus/backend/no_destructive_migrations/compliant-02/modules/notes/migrations/versions/0001_change.py +8 -8
- package/corpus/backend/no_destructive_migrations/violation-01/expected-findings.json +7 -7
- package/corpus/backend/no_destructive_migrations/violation-01/modules/notes/migrations/versions/0001_change.py +2 -2
- package/corpus/backend/no_destructive_migrations/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_destructive_migrations/violation-02/modules/notes/migrations/versions/0001_change.py +2 -2
- package/corpus/backend/no_destructive_migrations/violation-03/expected-findings.json +7 -7
- package/corpus/backend/no_destructive_migrations/violation-03/modules/notes/migrations/versions/0001_change.py +3 -3
- package/corpus/backend/no_destructive_migrations/violation-04/expected-findings.json +12 -12
- package/corpus/backend/no_destructive_migrations/violation-04/modules/notes/migrations/versions/0001_change.py +6 -6
- package/corpus/backend/no_destructive_migrations/violation-05/expected-findings.json +12 -12
- package/corpus/backend/no_destructive_migrations/violation-05/modules/notes/migrations/versions/0001_change.py +3 -3
- package/corpus/backend/no_dynamic_sql/compliant-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_dynamic_sql/compliant-02/modules/notes/service.py +20 -20
- package/corpus/backend/no_dynamic_sql/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_dynamic_sql/violation-02/modules/notes/service.py +2 -2
- package/corpus/backend/no_dynamic_sql/violation-03/modules/notes/service.py +7 -7
- package/corpus/backend/no_dynamic_sql/violation-04/modules/notes/service.py +16 -16
- package/corpus/backend/no_empty_tests/compliant-01/tests/test_notes.py +2 -2
- package/corpus/backend/no_empty_tests/violation-01/tests/test_notes.py +2 -2
- package/corpus/backend/no_eval_or_exec/compliant-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_eval_or_exec/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_hardcoded_credentials/compliant-01/modules/billing/service.py +3 -3
- package/corpus/backend/no_hardcoded_credentials/compliant-02/modules/billing/service.py +18 -18
- package/corpus/backend/no_hardcoded_credentials/violation-01/expected-findings.json +7 -7
- package/corpus/backend/no_hardcoded_credentials/violation-01/modules/billing/service.py +2 -2
- package/corpus/backend/no_hardcoded_credentials/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_hardcoded_credentials/violation-02/modules/billing/service.py +1 -1
- package/corpus/backend/no_hardcoded_credentials/violation-03/expected-findings.json +22 -22
- package/corpus/backend/no_hardcoded_credentials/violation-03/modules/billing/service.py +11 -11
- package/corpus/backend/no_hardcoded_credentials/violation-04/expected-findings.json +12 -12
- package/corpus/backend/no_hardcoded_credentials/violation-04/modules/billing/service.py +8 -8
- package/corpus/backend/no_hardcoded_credentials/violation-05/expected-findings.json +12 -12
- package/corpus/backend/no_hardcoded_credentials/violation-05/modules/billing/service.py +4 -4
- package/corpus/backend/no_internal_imports/compliant-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_internal_imports/violation-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_manual_actor_stamping/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/no_manual_actor_stamping/compliant-02/modules/notes/schemas.py +12 -12
- package/corpus/backend/no_manual_actor_stamping/violation-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_manual_actor_stamping/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_manual_actor_stamping/violation-02/modules/notes/service.py +4 -4
- package/corpus/backend/no_manual_ownership_checks/compliant-01/modules/journals/service.py +3 -3
- package/corpus/backend/no_manual_ownership_checks/compliant-02/modules/journals/schemas.py +11 -11
- package/corpus/backend/no_manual_ownership_checks/violation-01/modules/journals/service.py +3 -3
- package/corpus/backend/no_manual_ownership_checks/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_manual_ownership_checks/violation-02/modules/journals/service.py +9 -9
- package/corpus/backend/no_manual_ownership_checks/violation-03/expected-findings.json +7 -7
- package/corpus/backend/no_manual_ownership_checks/violation-03/modules/notes/jobs.py +1 -1
- package/corpus/backend/no_manual_ownership_checks/violation-03/modules/notes/models.py +7 -7
- package/corpus/backend/no_manual_ownership_checks/violation-03/modules/notes/module.py +11 -11
- package/corpus/backend/no_manual_ownership_checks/violation-03/modules/notes/service.py +7 -7
- package/corpus/backend/no_manual_scope_filtering/compliant-01/modules/notes/service.py +8 -8
- package/corpus/backend/no_manual_scope_filtering/compliant-02/modules/notes/schemas.py +12 -12
- package/corpus/backend/no_manual_scope_filtering/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_manual_scope_filtering/violation-02/modules/notes/service.py +2 -2
- package/corpus/backend/no_manual_scope_filtering/violation-03/expected-findings.json +7 -7
- package/corpus/backend/no_manual_scope_filtering/violation-03/modules/notes/service.py +7 -7
- package/corpus/backend/no_manual_table_schema/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/no_manual_table_schema/violation-01/modules/notes/models.py +8 -8
- package/corpus/backend/no_manual_version_assignment/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/no_manual_version_assignment/violation-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_manual_version_assignment/violation-02/modules/notes/service.py +3 -3
- package/corpus/backend/no_manual_version_assignment/violation-03/modules/notes/service.py +3 -3
- package/corpus/backend/no_mutable_default_args/compliant-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_mutable_default_args/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_naive_datetime/compliant-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_naive_datetime/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_naive_datetime/violation-02/modules/notes/service.py +2 -2
- package/corpus/backend/no_oversized_python_files/compliant-01/modules/notes/service.py +9 -9
- package/corpus/backend/no_oversized_python_files/violation-01/modules/notes/service.py +530 -530
- package/corpus/backend/no_print/compliant-01/modules/notes/service.py +7 -7
- package/corpus/backend/no_print/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_raw_app_routes/compliant-01/main.py +12 -12
- package/corpus/backend/no_raw_app_routes/violation-01/main.py +10 -10
- package/corpus/backend/no_raw_app_routes/violation-02/main.py +16 -16
- package/corpus/backend/no_raw_app_routes/violation-03/main.py +12 -12
- package/corpus/backend/no_raw_app_routes/violation-04/main.py +10 -10
- package/corpus/backend/no_raw_app_routes/violation-05/main.py +12 -12
- package/corpus/backend/no_raw_app_routes/violation-06/main.py +10 -10
- package/corpus/backend/no_raw_connection_access/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/no_raw_connection_access/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_raw_connection_access/violation-02/modules/notes/service.py +2 -2
- package/corpus/backend/no_raw_file_references/compliant-01/modules/notes/models.py +10 -10
- package/corpus/backend/no_raw_file_references/violation-01/modules/notes/models.py +9 -9
- package/corpus/backend/no_raw_outbound_http/compliant-01/modules/notes/service.py +2 -2
- package/corpus/backend/no_raw_outbound_http/compliant-03/modules/notes/service.py +12 -12
- package/corpus/backend/no_raw_outbound_http/violation-01/expected-findings.json +7 -7
- package/corpus/backend/no_raw_outbound_http/violation-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_raw_outbound_http/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_raw_outbound_http/violation-02/modules/notes/service.py +1 -1
- package/corpus/backend/no_raw_outbound_http/violation-03/expected-findings.json +7 -7
- package/corpus/backend/no_raw_outbound_http/violation-03/modules/notes/service.py +1 -1
- package/corpus/backend/no_raw_outbound_http/violation-04/expected-findings.json +12 -12
- package/corpus/backend/no_raw_outbound_http/violation-04/modules/notes/service.py +7 -7
- package/corpus/backend/no_raw_outbound_http/violation-05/expected-findings.json +12 -12
- package/corpus/backend/no_raw_outbound_http/violation-05/modules/notes/service.py +5 -5
- package/corpus/backend/no_raw_outbound_http/violation-06/expected-findings.json +12 -12
- package/corpus/backend/no_raw_outbound_http/violation-06/modules/notes/service.py +2 -2
- package/corpus/backend/no_raw_session_construction/compliant-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_raw_session_construction/violation-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_star_imports/compliant-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_star_imports/violation-01/modules/notes/service.py +1 -1
- package/corpus/backend/no_todo_fixme/compliant-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_todo_fixme/violation-01/modules/notes/service.py +3 -3
- package/corpus/backend/no_unique_columns_on_soft_delete_models/compliant-01/modules/notes/models.py +17 -17
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-01/expected-findings.json +7 -7
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-01/modules/notes/models.py +6 -6
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-02/expected-findings.json +7 -7
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-02/modules/notes/models.py +13 -13
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-03/expected-findings.json +7 -7
- package/corpus/backend/no_unique_columns_on_soft_delete_models/violation-03/modules/notes/models.py +16 -16
- package/corpus/backend/offset_queries_declare_ordering/compliant-01/modules/notes/service.py +4 -4
- package/corpus/backend/offset_queries_declare_ordering/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/path_id_params_are_uuid/compliant-01/modules/notes/router.py +6 -6
- package/corpus/backend/path_id_params_are_uuid/violation-01/modules/notes/router.py +6 -6
- package/corpus/backend/policy_refs_resolve/compliant-01/modules/notes/module.py +7 -7
- package/corpus/backend/policy_refs_resolve/violation-01/modules/notes/module.py +8 -8
- package/corpus/backend/public_modules_are_read_only/compliant-01/modules/notes/module.py +7 -7
- package/corpus/backend/public_modules_are_read_only/compliant-01/modules/notes/router.py +3 -3
- package/corpus/backend/public_modules_are_read_only/violation-01/expected-findings.json +7 -7
- package/corpus/backend/public_modules_are_read_only/violation-01/modules/notes/module.py +7 -7
- package/corpus/backend/public_modules_are_read_only/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/public_modules_are_read_only/violation-02/expected-findings.json +7 -7
- package/corpus/backend/public_modules_are_read_only/violation-02/modules/notes/module.py +7 -7
- package/corpus/backend/public_modules_are_read_only/violation-02/modules/notes/router.py +5 -5
- package/corpus/backend/reads_use_base_query/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/reads_use_base_query/compliant-01/modules/notes/service.py +8 -8
- package/corpus/backend/reads_use_base_query/compliant-02/modules/notes/models.py +9 -9
- package/corpus/backend/reads_use_base_query/compliant-02/modules/notes/service.py +9 -9
- package/corpus/backend/reads_use_base_query/violation-01/modules/notes/models.py +6 -6
- package/corpus/backend/reads_use_base_query/violation-01/modules/notes/service.py +9 -9
- package/corpus/backend/reads_use_base_query/violation-02/expected-findings.json +7 -7
- package/corpus/backend/reads_use_base_query/violation-02/modules/notes/models.py +6 -6
- package/corpus/backend/reads_use_base_query/violation-02/modules/notes/service.py +8 -8
- package/corpus/backend/response_model_not_table_model/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/response_model_not_table_model/compliant-01/modules/notes/router.py +3 -3
- package/corpus/backend/response_model_not_table_model/compliant-01/modules/notes/schemas.py +5 -5
- package/corpus/backend/response_model_not_table_model/violation-01/modules/notes/models.py +6 -6
- package/corpus/backend/response_model_not_table_model/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/routes_declare_response_model/compliant-01/modules/notes/router.py +8 -8
- package/corpus/backend/routes_declare_response_model/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/safe_methods_are_read_only/compliant-01/modules/notes/router.py +6 -6
- package/corpus/backend/safe_methods_are_read_only/compliant-02/modules/notes/router.py +5 -5
- package/corpus/backend/safe_methods_are_read_only/violation-01/expected-findings.json +7 -7
- package/corpus/backend/safe_methods_are_read_only/violation-01/modules/notes/router.py +3 -3
- package/corpus/backend/safe_methods_are_read_only/violation-02/expected-findings.json +7 -7
- package/corpus/backend/safe_methods_are_read_only/violation-02/modules/notes/router.py +5 -5
- package/corpus/backend/safe_methods_are_read_only/violation-03/expected-findings.json +7 -7
- package/corpus/backend/safe_methods_are_read_only/violation-03/modules/notes/router.py +3 -3
- package/corpus/backend/schemas_exclude_sensitive_fields/compliant-01/modules/users/schemas.py +5 -5
- package/corpus/backend/schemas_exclude_sensitive_fields/compliant-02/modules/accounts/schemas.py +12 -12
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-01/expected-findings.json +7 -7
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-01/modules/users/schemas.py +3 -3
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-02/expected-findings.json +7 -7
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-02/modules/connectors/router.py +8 -8
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-03/expected-findings.json +17 -17
- package/corpus/backend/schemas_exclude_sensitive_fields/violation-03/modules/integrations/schemas.py +7 -7
- package/corpus/backend/session_imported_from_sqlmodel/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/session_imported_from_sqlmodel/violation-01/modules/notes/service.py +5 -5
- package/corpus/backend/table_models_use_base_table/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/table_models_use_base_table/violation-01/modules/notes/models.py +5 -5
- package/corpus/backend/tables_have_migrations/compliant-01/modules/notes/migrations/versions/0a1b2c3d4e5f_create_notes_tables.py +22 -22
- package/corpus/backend/tables_have_migrations/compliant-01/modules/notes/models.py +6 -6
- package/corpus/backend/tables_have_migrations/compliant-02/capabilities/ledger/models.py +6 -6
- package/corpus/backend/tables_have_migrations/violation-01/expected-findings.json +7 -7
- package/corpus/backend/tables_have_migrations/violation-01/modules/notes/models.py +6 -6
- package/corpus/backend/tables_have_migrations/violation-02/expected-findings.json +7 -7
- package/corpus/backend/tables_have_migrations/violation-02/modules/notes/models.py +10 -10
- package/corpus/backend/tenant_scoped_models_use_scoped_service/compliant-01/modules/projects/models.py +6 -6
- package/corpus/backend/tenant_scoped_models_use_scoped_service/compliant-01/modules/projects/service.py +5 -5
- package/corpus/backend/tenant_scoped_models_use_scoped_service/compliant-02/modules/projects/models.py +8 -8
- package/corpus/backend/tenant_scoped_models_use_scoped_service/compliant-02/modules/projects/service.py +5 -5
- package/corpus/backend/tenant_scoped_models_use_scoped_service/violation-01/modules/projects/models.py +6 -6
- package/corpus/backend/tenant_scoped_models_use_scoped_service/violation-01/modules/projects/service.py +5 -5
- package/corpus/backend/ungoverned_escape_hatch/compliant-01/modules/notes/service.py +5 -5
- package/corpus/backend/ungoverned_escape_hatch/compliant-02/modules/notes/service.py +4 -4
- package/corpus/backend/ungoverned_escape_hatch/violation-01/modules/notes/service.py +2 -2
- package/corpus/backend/update_schemas_inherit_base_update_schema/compliant-01/modules/notes/schemas.py +2 -2
- package/corpus/backend/update_schemas_inherit_base_update_schema/violation-01/modules/notes/schemas.py +2 -2
- package/corpus/backend/update_schemas_inherit_base_update_schema/violation-02/modules/notes/schemas.py +5 -5
- package/corpus/frontend/escape-hatch/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/escape-hatch/violation-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/escape-hatch/violation-02/src/modules/widgets/Widget.tsx +7 -7
- package/corpus/frontend/escape-hatch/violation-03/src/modules/widgets/Widget.tsx +7 -7
- package/corpus/frontend/generated-client-only/compliant-01/src/modules/widgets/Widget.tsx +6 -6
- package/corpus/frontend/generated-client-only/compliant-02/src/modules/widgets/Widget.tsx +21 -21
- package/corpus/frontend/generated-client-only/compliant-03/src/modules/widgets/Widget.tsx +7 -7
- package/corpus/frontend/generated-client-only/compliant-04/src/modules/widgets/Widget.tsx +17 -17
- package/corpus/frontend/generated-client-only/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/generated-client-only/violation-02/src/modules/widgets/Widget.tsx +9 -9
- package/corpus/frontend/generated-client-only/violation-03/src/modules/widgets/Widget.tsx +14 -14
- package/corpus/frontend/generated-client-only/violation-04/src/modules/widgets/Widget.tsx +6 -6
- package/corpus/frontend/layout-contract/compliant-01/layout-contract.json +3 -3
- package/corpus/frontend/layout-contract/compliant-01/src/modules/widgets/Widget.tsx +8 -8
- package/corpus/frontend/layout-contract/violation-01/layout-contract.json +3 -3
- package/corpus/frontend/layout-contract/violation-01/src/modules/widgets/Widget.tsx +8 -8
- package/corpus/frontend/no-cross-module-imports/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-cross-module-imports/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-deep-imports/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-deep-imports/violation-01/src/modules/widgets/Widget.tsx +2 -2
- package/corpus/frontend/no-dom-html-injection/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-dom-html-injection/compliant-02/src/modules/widgets/Widget.tsx +11 -11
- package/corpus/frontend/no-dom-html-injection/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-dom-html-injection/violation-02/src/modules/widgets/Widget.tsx +7 -7
- package/corpus/frontend/no-dom-html-injection/violation-03/src/modules/widgets/Widget.tsx +12 -12
- package/corpus/frontend/no-eval/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-eval/compliant-02/src/modules/widgets/Widget.tsx +11 -11
- package/corpus/frontend/no-eval/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-eval/violation-02/src/modules/widgets/Widget.tsx +7 -7
- package/corpus/frontend/no-eval/violation-03/src/modules/widgets/Widget.tsx +10 -10
- package/corpus/frontend/no-eval/violation-04/src/modules/widgets/Widget.tsx +6 -6
- package/corpus/frontend/no-inline-styling/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-inline-styling/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-inline-styling/violation-02/src/modules/widgets/Widget.tsx +6 -6
- package/corpus/frontend/no-style-imports/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/no-style-imports/violation-01/src/modules/widgets/Widget.tsx +2 -2
- package/corpus/frontend/no-unsafe-href/compliant-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-unsafe-href/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-unsafe-target-blank/compliant-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/no-unsafe-target-blank/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/router-links/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/router-links/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/corpus/frontend/token-styled-elements/compliant-01/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/token-styled-elements/compliant-02/src/modules/widgets/Widget.tsx +4 -4
- package/corpus/frontend/token-styled-elements/violation-01/src/modules/widgets/Widget.tsx +3 -3
- package/findings.schema.json +40 -40
- package/package.json +23 -23
- package/restricted-surface.json +10 -10
- package/scorecard.schema.json +52 -52
package/corpus/backend/schemas_exclude_sensitive_fields/violation-02/modules/connectors/router.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
class ConnectorStatus:
|
|
2
|
-
name: str
|
|
3
|
-
api_key: str
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@router.get('/status', response_model=ConnectorStatus)
|
|
7
|
-
def connector_status() -> ConnectorStatus:
|
|
8
|
-
return ConnectorStatus()
|
|
1
|
+
class ConnectorStatus:
|
|
2
|
+
name: str
|
|
3
|
+
api_key: str
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
@router.get('/status', response_model=ConnectorStatus)
|
|
7
|
+
def connector_status() -> ConnectorStatus:
|
|
8
|
+
return ConnectorStatus()
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
4
|
-
"path": "modules/integrations/schemas.py",
|
|
5
|
-
"line": 5
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
9
|
-
"path": "modules/integrations/schemas.py",
|
|
10
|
-
"line": 6
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
14
|
-
"path": "modules/integrations/schemas.py",
|
|
15
|
-
"line": 7
|
|
16
|
-
}
|
|
17
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
4
|
+
"path": "modules/integrations/schemas.py",
|
|
5
|
+
"line": 5
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
9
|
+
"path": "modules/integrations/schemas.py",
|
|
10
|
+
"line": 6
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"rule": "backend/schemas_exclude_sensitive_fields",
|
|
14
|
+
"path": "modules/integrations/schemas.py",
|
|
15
|
+
"line": 7
|
|
16
|
+
}
|
|
17
|
+
]
|
package/corpus/backend/schemas_exclude_sensitive_fields/violation-03/modules/integrations/schemas.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
from terp.core import BaseSchema
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class IntegrationRead(BaseSchema):
|
|
5
|
-
client_secret: str
|
|
6
|
-
private_key: str
|
|
7
|
-
refresh_token: str
|
|
1
|
+
from terp.core import BaseSchema
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class IntegrationRead(BaseSchema):
|
|
5
|
+
client_secret: str
|
|
6
|
+
private_key: str
|
|
7
|
+
refresh_token: str
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from sqlmodel import Session
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def note_count(session: Session) -> int:
|
|
5
|
-
return len(session.exec(query).all())
|
|
1
|
+
from sqlmodel import Session
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def note_count(session: Session) -> int:
|
|
5
|
+
return len(session.exec(query).all())
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from sqlalchemy.orm import Session
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def note_count(session: Session) -> int:
|
|
5
|
-
return len(session.exec(query).all())
|
|
1
|
+
from sqlalchemy.orm import Session
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def note_count(session: Session) -> int:
|
|
5
|
+
return len(session.exec(query).all())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Note(BaseTable, table=True):
|
|
6
|
-
title: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Note(BaseTable, table=True):
|
|
6
|
+
title: str = Field(max_length=200)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from sqlmodel import Field, SQLModel
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Note(SQLModel, table=True):
|
|
5
|
-
title: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field, SQLModel
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Note(SQLModel, table=True):
|
|
5
|
+
title: str = Field(max_length=200)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"""create notes tables
|
|
2
|
-
|
|
3
|
-
Revision ID: 0a1b2c3d4e5f
|
|
4
|
-
Revises:
|
|
5
|
-
"""
|
|
6
|
-
from alembic import op
|
|
7
|
-
import sqlalchemy as sa
|
|
8
|
-
|
|
9
|
-
revision = "0a1b2c3d4e5f"
|
|
10
|
-
down_revision = None
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def upgrade() -> None:
|
|
14
|
-
op.create_table(
|
|
15
|
-
"note",
|
|
16
|
-
sa.Column("id", sa.Uuid(), primary_key=True),
|
|
17
|
-
sa.Column("title", sa.String(length=200), nullable=False),
|
|
18
|
-
)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
def downgrade() -> None:
|
|
22
|
-
op.drop_table("note")
|
|
1
|
+
"""create notes tables
|
|
2
|
+
|
|
3
|
+
Revision ID: 0a1b2c3d4e5f
|
|
4
|
+
Revises:
|
|
5
|
+
"""
|
|
6
|
+
from alembic import op
|
|
7
|
+
import sqlalchemy as sa
|
|
8
|
+
|
|
9
|
+
revision = "0a1b2c3d4e5f"
|
|
10
|
+
down_revision = None
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def upgrade() -> None:
|
|
14
|
+
op.create_table(
|
|
15
|
+
"note",
|
|
16
|
+
sa.Column("id", sa.Uuid(), primary_key=True),
|
|
17
|
+
sa.Column("title", sa.String(length=200), nullable=False),
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def downgrade() -> None:
|
|
22
|
+
op.drop_table("note")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Note(BaseTable, table=True):
|
|
6
|
-
title: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Note(BaseTable, table=True):
|
|
6
|
+
title: str = Field(max_length=200)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class LedgerEntry(BaseTable, table=True):
|
|
6
|
-
amount_cents: int = Field(default=0)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class LedgerEntry(BaseTable, table=True):
|
|
6
|
+
amount_cents: int = Field(default=0)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"rule": "backend/tables_have_migrations",
|
|
4
|
-
"path": "modules/notes/models.py",
|
|
5
|
-
"line": 5
|
|
6
|
-
}
|
|
7
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"rule": "backend/tables_have_migrations",
|
|
4
|
+
"path": "modules/notes/models.py",
|
|
5
|
+
"line": 5
|
|
6
|
+
}
|
|
7
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Note(BaseTable, table=True):
|
|
6
|
-
title: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Note(BaseTable, table=True):
|
|
6
|
+
title: str = Field(max_length=200)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"rule": "backend/tables_have_migrations",
|
|
4
|
-
"path": "modules/notes/models.py",
|
|
5
|
-
"line": 5
|
|
6
|
-
}
|
|
7
|
-
]
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"rule": "backend/tables_have_migrations",
|
|
4
|
+
"path": "modules/notes/models.py",
|
|
5
|
+
"line": 5
|
|
6
|
+
}
|
|
7
|
+
]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class NoteTag(BaseTable, table=True):
|
|
6
|
-
label: str = Field(max_length=40)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class Note(BaseTable, table=True):
|
|
10
|
-
title: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class NoteTag(BaseTable, table=True):
|
|
6
|
+
label: str = Field(max_length=40)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Note(BaseTable, table=True):
|
|
10
|
+
title: str = Field(max_length=200)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable, TenantScopedMixin
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Project(BaseTable, TenantScopedMixin, table=True):
|
|
6
|
-
name: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable, TenantScopedMixin
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Project(BaseTable, TenantScopedMixin, table=True):
|
|
6
|
+
name: str = Field(max_length=200)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from terp.core import TenantScopedService
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ProjectService(TenantScopedService):
|
|
5
|
-
model = Project
|
|
1
|
+
from terp.core import TenantScopedService
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProjectService(TenantScopedService):
|
|
5
|
+
model = Project
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Attachment(BaseTable, table=True):
|
|
6
|
-
"""Not tenant-scoped (no TenantScopedMixin) — a plain BaseService is fine."""
|
|
7
|
-
|
|
8
|
-
name: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Attachment(BaseTable, table=True):
|
|
6
|
+
"""Not tenant-scoped (no TenantScopedMixin) — a plain BaseService is fine."""
|
|
7
|
+
|
|
8
|
+
name: str = Field(max_length=200)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from terp.core import BaseService
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class AttachmentService(BaseService):
|
|
5
|
-
model = Attachment
|
|
1
|
+
from terp.core import BaseService
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AttachmentService(BaseService):
|
|
5
|
+
model = Attachment
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
from sqlmodel import Field
|
|
2
|
-
from terp.core import BaseTable, TenantScopedMixin
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class Project(BaseTable, TenantScopedMixin, table=True):
|
|
6
|
-
name: str = Field(max_length=200)
|
|
1
|
+
from sqlmodel import Field
|
|
2
|
+
from terp.core import BaseTable, TenantScopedMixin
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Project(BaseTable, TenantScopedMixin, table=True):
|
|
6
|
+
name: str = Field(max_length=200)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from terp.core import BaseService
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ProjectService(BaseService):
|
|
5
|
-
model = Project
|
|
1
|
+
from terp.core import BaseService
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ProjectService(BaseService):
|
|
5
|
+
model = Project
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from terp.core import BaseService
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class NoteService(BaseService):
|
|
5
|
-
model = Note
|
|
1
|
+
from terp.core import BaseService
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class NoteService(BaseService):
|
|
5
|
+
model = Note
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
def render_help():
|
|
2
|
-
# Marker-shaped text inside a string is not an opt-out marker: it is neither
|
|
3
|
-
# honoured nor counted, so this file carries no ungoverned marker.
|
|
4
|
-
return "suppress with '# arch-allow-no-dynamic-sql: <reason>' after review"
|
|
1
|
+
def render_help():
|
|
2
|
+
# Marker-shaped text inside a string is not an opt-out marker: it is neither
|
|
3
|
+
# honoured nor counted, so this file carries no ungoverned marker.
|
|
4
|
+
return "suppress with '# arch-allow-no-dynamic-sql: <reason>' after review"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
def legacy_report(session, sql):
|
|
2
|
-
return session.execute(text(sql)) # arch-allow-no-dynamic-sql: legacy reporting query, parameterised upstream
|
|
1
|
+
def legacy_report(session, sql):
|
|
2
|
+
return session.execute(text(sql)) # arch-allow-no-dynamic-sql: legacy reporting query, parameterised upstream
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class NoteUpdate(BaseUpdateSchema):
|
|
2
|
-
title: str
|
|
1
|
+
class NoteUpdate(BaseUpdateSchema):
|
|
2
|
+
title: str
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
class NoteUpdate(BaseSchema):
|
|
2
|
-
title: str
|
|
1
|
+
class NoteUpdate(BaseSchema):
|
|
2
|
+
title: str
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
class NotePatch(BaseSchema):
|
|
2
|
-
title: str
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
router = build_crud_router(update_schema=NotePatch)
|
|
1
|
+
class NotePatch(BaseSchema):
|
|
2
|
+
title: str
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
router = build_crud_router(update_schema=NotePatch)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export function Widget() {
|
|
2
|
-
// terp-allow-token-styled-elements: native button needed for a browser extension host
|
|
3
|
-
return <button>save</button>;
|
|
4
|
-
}
|
|
1
|
+
export function Widget() {
|
|
2
|
+
// terp-allow-token-styled-elements: native button needed for a browser extension host
|
|
3
|
+
return <button>save</button>;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// terp-allow-token-styled-elements
|
|
2
|
-
export function Widget() {
|
|
3
|
-
return <button>save</button>;
|
|
4
|
-
}
|
|
1
|
+
// terp-allow-token-styled-elements
|
|
2
|
+
export function Widget() {
|
|
3
|
+
return <button>save</button>;
|
|
4
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function Widget() {
|
|
2
|
-
// A marker that names no rule with a governed opt-out (a typo, a stale name,
|
|
3
|
-
// or the governance rule's own name) is itself a violation - it can never be
|
|
4
|
-
// budgeted into legitimacy.
|
|
5
|
-
// terp-allow-made-up-rule: stale name
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
1
|
+
export function Widget() {
|
|
2
|
+
// A marker that names no rule with a governed opt-out (a typo, a stale name,
|
|
3
|
+
// or the governance rule's own name) is itself a violation - it can never be
|
|
4
|
+
// budgeted into legitimacy.
|
|
5
|
+
// terp-allow-made-up-rule: stale name
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function Widget() {
|
|
2
|
-
// A marker spelled with a RETIRED tool-internal rule id (the pre-0.6.0
|
|
3
|
-
// core-id spelling) names no catalog rule, so it waives nothing: the
|
|
4
|
-
// violation underneath still fires and the stale marker is itself reported.
|
|
5
|
-
// terp-allow-no-restricted-syntax: pre-0.6.0 spelling (migrate to the catalog rule name)
|
|
6
|
-
return <button>x</button>;
|
|
7
|
-
}
|
|
1
|
+
export function Widget() {
|
|
2
|
+
// A marker spelled with a RETIRED tool-internal rule id (the pre-0.6.0
|
|
3
|
+
// core-id spelling) names no catalog rule, so it waives nothing: the
|
|
4
|
+
// violation underneath still fires and the stale marker is itself reported.
|
|
5
|
+
// terp-allow-no-restricted-syntax: pre-0.6.0 spelling (migrate to the catalog rule name)
|
|
6
|
+
return <button>x</button>;
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useTerpClient } from "@terp/react-core";
|
|
2
|
-
export function Widget() {
|
|
3
|
-
const client = useTerpClient();
|
|
4
|
-
void client;
|
|
5
|
-
return null;
|
|
6
|
-
}
|
|
1
|
+
import { useTerpClient } from "@terp/react-core";
|
|
2
|
+
export function Widget() {
|
|
3
|
+
const client = useTerpClient();
|
|
4
|
+
void client;
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { useTerpClient } from "@terp/react-core";
|
|
2
|
-
|
|
3
|
-
const repository = {
|
|
4
|
-
fetch(id: string): string {
|
|
5
|
-
return id;
|
|
6
|
-
},
|
|
7
|
-
sendBeacon(payload: string): number {
|
|
8
|
-
return payload.length;
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export function Widget() {
|
|
13
|
-
const client = useTerpClient();
|
|
14
|
-
void client;
|
|
15
|
-
// fetch("/api/notes") would be refused; the typed client is the one egress path.
|
|
16
|
-
const doc = "WebSocket / XMLHttpRequest / EventSource / fetch are refused in app modules";
|
|
17
|
-
void doc;
|
|
18
|
-
void repository.fetch("1");
|
|
19
|
-
void repository.sendBeacon("x");
|
|
20
|
-
return null;
|
|
21
|
-
}
|
|
1
|
+
import { useTerpClient } from "@terp/react-core";
|
|
2
|
+
|
|
3
|
+
const repository = {
|
|
4
|
+
fetch(id: string): string {
|
|
5
|
+
return id;
|
|
6
|
+
},
|
|
7
|
+
sendBeacon(payload: string): number {
|
|
8
|
+
return payload.length;
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function Widget() {
|
|
13
|
+
const client = useTerpClient();
|
|
14
|
+
void client;
|
|
15
|
+
// fetch("/api/notes") would be refused; the typed client is the one egress path.
|
|
16
|
+
const doc = "WebSocket / XMLHttpRequest / EventSource / fetch are refused in app modules";
|
|
17
|
+
void doc;
|
|
18
|
+
void repository.fetch("1");
|
|
19
|
+
void repository.sendBeacon("x");
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export function Widget() {
|
|
2
|
-
// One catalog rule, one marker: it covers every detection path of the egress
|
|
3
|
-
// family (bare and window-qualified alike).
|
|
4
|
-
// terp-allow-generated-client-only: sanctioned probe for a health widget
|
|
5
|
-
void window.fetch("/healthz");
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
1
|
+
export function Widget() {
|
|
2
|
+
// One catalog rule, one marker: it covers every detection path of the egress
|
|
3
|
+
// family (bare and window-qualified alike).
|
|
4
|
+
// terp-allow-generated-client-only: sanctioned probe for a health widget
|
|
5
|
+
void window.fetch("/healthz");
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { useRealtimeChannel } from "@terp/react-core";
|
|
2
|
-
|
|
3
|
-
type Notice = { sequence: number; text: string };
|
|
4
|
-
|
|
5
|
-
function isNotice(value: unknown): value is Notice {
|
|
6
|
-
if (typeof value !== "object" || value === null) return false;
|
|
7
|
-
const item = value as Record<string, unknown>;
|
|
8
|
-
return typeof item.sequence === "number" && typeof item.text === "string";
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function Widget() {
|
|
12
|
-
const notices = useRealtimeChannel({
|
|
13
|
-
channel: "system.notices",
|
|
14
|
-
validate: isNotice,
|
|
15
|
-
});
|
|
16
|
-
return <p>{notices.lastMessage?.text ?? "Waiting"}</p>;
|
|
17
|
-
}
|
|
1
|
+
import { useRealtimeChannel } from "@terp/react-core";
|
|
2
|
+
|
|
3
|
+
type Notice = { sequence: number; text: string };
|
|
4
|
+
|
|
5
|
+
function isNotice(value: unknown): value is Notice {
|
|
6
|
+
if (typeof value !== "object" || value === null) return false;
|
|
7
|
+
const item = value as Record<string, unknown>;
|
|
8
|
+
return typeof item.sequence === "number" && typeof item.text === "string";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function Widget() {
|
|
12
|
+
const notices = useRealtimeChannel({
|
|
13
|
+
channel: "system.notices",
|
|
14
|
+
validate: isNotice,
|
|
15
|
+
});
|
|
16
|
+
return <p>{notices.lastMessage?.text ?? "Waiting"}</p>;
|
|
17
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export async function load() {
|
|
2
|
-
return fetch("/api/notes");
|
|
3
|
-
}
|
|
1
|
+
export async function load() {
|
|
2
|
+
return fetch("/api/notes");
|
|
3
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export async function load(path: string) {
|
|
2
|
-
return globalThis.fetch(path);
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
export async function loadComputed(path: string) {
|
|
6
|
-
return window["fetch"](path);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const transport = fetch;
|
|
1
|
+
export async function load(path: string) {
|
|
2
|
+
return globalThis.fetch(path);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export async function loadComputed(path: string) {
|
|
6
|
+
return window["fetch"](path);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const transport = fetch;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export function connect(url: string) {
|
|
2
|
-
return new WebSocket(
|
|
3
|
-
url,
|
|
4
|
-
["v1"],
|
|
5
|
-
);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function subscribe(url: string) {
|
|
9
|
-
return new window.EventSource(url);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function flush(url: string, data: string) {
|
|
13
|
-
navigator.sendBeacon(url, data);
|
|
14
|
-
}
|
|
1
|
+
export function connect(url: string) {
|
|
2
|
+
return new WebSocket(
|
|
3
|
+
url,
|
|
4
|
+
["v1"],
|
|
5
|
+
);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export function subscribe(url: string) {
|
|
9
|
+
return new window.EventSource(url);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function flush(url: string, data: string) {
|
|
13
|
+
navigator.sendBeacon(url, data);
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export function transportFactory() {
|
|
2
|
-
const Ctor = XMLHttpRequest;
|
|
3
|
-
return Ctor;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const events = EventSource;
|
|
1
|
+
export function transportFactory() {
|
|
2
|
+
const Ctor = XMLHttpRequest;
|
|
3
|
+
return Ctor;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const events = EventSource;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
{
|
|
2
|
-
"contract": "standard"
|
|
3
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"contract": "standard"
|
|
3
|
+
}
|