|
| 1 | +{ |
| 2 | + "weights": { |
| 3 | + "required_findings": 0.25, |
| 4 | + "file_references": 0.30, |
| 5 | + "causal_chain": 0.30, |
| 6 | + "negative_checks": 0.15 |
| 7 | + }, |
| 8 | + "required_findings": [ |
| 9 | + { |
| 10 | + "id": "purpose_authz", |
| 11 | + "patterns": ["external authorization", "ext_?authz", "authorization service", "delegat(e|ing) auth"], |
| 12 | + "weight": 1.0, |
| 13 | + "description": "Identifies that ext_authz delegates authorization decisions to an external service", |
| 14 | + "section": "purpose" |
| 15 | + }, |
| 16 | + { |
| 17 | + "id": "purpose_grpc_http", |
| 18 | + "patterns": ["gRPC", "HTTP.*protocol", "protocol.*service"], |
| 19 | + "weight": 1.0, |
| 20 | + "description": "Mentions that ext_authz supports gRPC or HTTP protocol for authz service", |
| 21 | + "section": "purpose" |
| 22 | + }, |
| 23 | + { |
| 24 | + "id": "upstream_grpc_async", |
| 25 | + "patterns": ["Grpc::AsyncClient", "AsyncClient", "grpc.*client"], |
| 26 | + "weight": 1.0, |
| 27 | + "description": "Identifies gRPC async client as upstream dependency", |
| 28 | + "section": "dependencies" |
| 29 | + }, |
| 30 | + { |
| 31 | + "id": "upstream_http_filter_chain", |
| 32 | + "patterns": ["http.*filter.*chain", "StreamDecoderFilter", "filter.*interface"], |
| 33 | + "weight": 1.0, |
| 34 | + "description": "Identifies HTTP filter chain/interface dependency", |
| 35 | + "section": "dependencies" |
| 36 | + }, |
| 37 | + { |
| 38 | + "id": "failure_mode_timeout", |
| 39 | + "patterns": ["timeout", "request.*timeout", "TTL"], |
| 40 | + "weight": 1.0, |
| 41 | + "description": "Mentions timeout as a failure mode", |
| 42 | + "section": "failure_modes" |
| 43 | + }, |
| 44 | + { |
| 45 | + "id": "failure_mode_unavailable", |
| 46 | + "patterns": ["service.*unavailable", "connection.*fail", "network.*error"], |
| 47 | + "weight": 1.0, |
| 48 | + "description": "Mentions service unavailability as failure mode", |
| 49 | + "section": "failure_modes" |
| 50 | + }, |
| 51 | + { |
| 52 | + "id": "testing_integration", |
| 53 | + "patterns": ["integration.*test", "ext_authz.*integration", "test/integration"], |
| 54 | + "weight": 1.0, |
| 55 | + "description": "Identifies integration tests for ext_authz", |
| 56 | + "section": "testing" |
| 57 | + } |
| 58 | + ], |
| 59 | + "file_references": [ |
| 60 | + { |
| 61 | + "id": "file_ext_authz_h", |
| 62 | + "patterns": ["source/extensions/filters/http/ext_authz/ext_authz\\.h"], |
| 63 | + "weight": 1.5, |
| 64 | + "description": "Main header file for ext_authz filter", |
| 65 | + "section": "key_files" |
| 66 | + }, |
| 67 | + { |
| 68 | + "id": "file_ext_authz_cc", |
| 69 | + "patterns": ["source/extensions/filters/http/ext_authz/ext_authz\\.cc"], |
| 70 | + "weight": 1.5, |
| 71 | + "description": "Main implementation file for ext_authz filter", |
| 72 | + "section": "key_files" |
| 73 | + }, |
| 74 | + { |
| 75 | + "id": "file_config", |
| 76 | + "patterns": ["source/extensions/filters/http/ext_authz/config\\.(h|cc)", "source/extensions/filters/http/ext_authz/config\\.h", "source/extensions/filters/http/ext_authz/config\\.cc"], |
| 77 | + "weight": 1.0, |
| 78 | + "description": "Configuration parsing for ext_authz", |
| 79 | + "section": "key_files" |
| 80 | + }, |
| 81 | + { |
| 82 | + "id": "file_ext_authz_grpc", |
| 83 | + "patterns": ["source/extensions/filters/http/ext_authz/ext_authz_grpc"], |
| 84 | + "weight": 1.0, |
| 85 | + "description": "gRPC client implementation for ext_authz", |
| 86 | + "section": "key_files" |
| 87 | + }, |
| 88 | + { |
| 89 | + "id": "file_ext_authz_http", |
| 90 | + "patterns": ["source/extensions/filters/http/ext_authz/ext_authz_http"], |
| 91 | + "weight": 1.0, |
| 92 | + "description": "HTTP client implementation for ext_authz", |
| 93 | + "section": "key_files" |
| 94 | + }, |
| 95 | + { |
| 96 | + "id": "test_integration", |
| 97 | + "patterns": ["test/integration/filters/ext_authz.*test\\.cc", "test/integration.*ext_authz"], |
| 98 | + "weight": 1.0, |
| 99 | + "description": "Integration test files", |
| 100 | + "section": "testing" |
| 101 | + }, |
| 102 | + { |
| 103 | + "id": "test_unit", |
| 104 | + "patterns": ["test/extensions/filters/http/ext_authz/.*test\\.cc", "test.*ext_authz.*test"], |
| 105 | + "weight": 1.0, |
| 106 | + "description": "Unit test files", |
| 107 | + "section": "testing" |
| 108 | + } |
| 109 | + ], |
| 110 | + "causal_chain": [ |
| 111 | + { |
| 112 | + "id": "chain_request_flow", |
| 113 | + "patterns": ["decodeHeaders", "check", "authorization service"], |
| 114 | + "weight": 1.5, |
| 115 | + "description": "Describes request flow from filter decoding to authorization service call", |
| 116 | + "section": "purpose" |
| 117 | + }, |
| 118 | + { |
| 119 | + "id": "chain_failure_handling", |
| 120 | + "patterns": ["timeout|failure|error", "fail.*mode", "deny|allow"], |
| 121 | + "weight": 1.5, |
| 122 | + "description": "Describes failure handling chain: error detection -> failure mode policy -> response generation", |
| 123 | + "section": "failure_modes" |
| 124 | + }, |
| 125 | + { |
| 126 | + "id": "chain_config_bootstrap", |
| 127 | + "patterns": ["bootstrap|envoy\\.yaml|config", "http_filters", "ext_authz"], |
| 128 | + "weight": 1.0, |
| 129 | + "description": "Describes configuration flow from bootstrap to filter chain to ext_authz config", |
| 130 | + "section": "dependencies" |
| 131 | + }, |
| 132 | + { |
| 133 | + "id": "chain_authz_response", |
| 134 | + "patterns": ["CheckResponse|authorization.*response", "ok|success", "continue"], |
| 135 | + "weight": 1.0, |
| 136 | + "description": "Describes successful authorization response flow", |
| 137 | + "section": "purpose" |
| 138 | + } |
| 139 | + ], |
| 140 | + "negative_checks": [ |
| 141 | + { |
| 142 | + "id": "neg_wrong_location", |
| 143 | + "patterns": ["source/common/http/ext_authz"], |
| 144 | + "weight": 1.0, |
| 145 | + "description": "Incorrect location (ext_authz is in extensions/, not common/)", |
| 146 | + "section": "key_files", |
| 147 | + "should_not_match": true |
| 148 | + }, |
| 149 | + { |
| 150 | + "id": "neg_single_protocol", |
| 151 | + "patterns": ["ext_authz (only supports|is limited to) (gRPC|HTTP)(?!.*and)"], |
| 152 | + "weight": 1.0, |
| 153 | + "description": "Incorrectly claims ext_authz only supports one protocol (it supports both gRPC and HTTP)", |
| 154 | + "section": "purpose", |
| 155 | + "should_not_match": true |
| 156 | + } |
| 157 | + ] |
| 158 | +} |
0 commit comments