@riligar/agents-kit 1.11.0 → 1.12.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.
@@ -1,122 +0,0 @@
1
- # API Security Testing
2
-
3
- > Principles for testing API security. OWASP API Top 10, authentication, authorization testing.
4
-
5
- ---
6
-
7
- ## OWASP API Security Top 10
8
-
9
- | Vulnerability | Test Focus |
10
- |---------------|------------|
11
- | **API1: BOLA** | Access other users' resources |
12
- | **API2: Broken Auth** | JWT, session, credentials |
13
- | **API3: Property Auth** | Mass assignment, data exposure |
14
- | **API4: Resource Consumption** | Rate limiting, DoS |
15
- | **API5: Function Auth** | Admin endpoints, role bypass |
16
- | **API6: Business Flow** | Logic abuse, automation |
17
- | **API7: SSRF** | Internal network access |
18
- | **API8: Misconfiguration** | Debug endpoints, CORS |
19
- | **API9: Inventory** | Shadow APIs, old versions |
20
- | **API10: Unsafe Consumption** | Third-party API trust |
21
-
22
- ---
23
-
24
- ## Authentication Testing
25
-
26
- ### JWT Testing
27
-
28
- | Check | What to Test |
29
- |-------|--------------|
30
- | Algorithm | None, algorithm confusion |
31
- | Secret | Weak secrets, brute force |
32
- | Claims | Expiration, issuer, audience |
33
- | Signature | Manipulation, key injection |
34
-
35
- ### Session Testing
36
-
37
- | Check | What to Test |
38
- |-------|--------------|
39
- | Generation | Predictability |
40
- | Storage | Client-side security |
41
- | Expiration | Timeout enforcement |
42
- | Invalidation | Logout effectiveness |
43
-
44
- ---
45
-
46
- ## Authorization Testing
47
-
48
- | Test Type | Approach |
49
- |-----------|----------|
50
- | **Horizontal** | Access peer users' data |
51
- | **Vertical** | Access higher privilege functions |
52
- | **Context** | Access outside allowed scope |
53
-
54
- ### BOLA/IDOR Testing
55
-
56
- 1. Identify resource IDs in requests
57
- 2. Capture request with user A's session
58
- 3. Replay with user B's session
59
- 4. Check for unauthorized access
60
-
61
- ---
62
-
63
- ## Input Validation Testing
64
-
65
- | Injection Type | Test Focus |
66
- |----------------|------------|
67
- | SQL | Query manipulation |
68
- | NoSQL | Document queries |
69
- | Command | System commands |
70
- | LDAP | Directory queries |
71
-
72
- **Approach:** Test all parameters, try type coercion, test boundaries, check error messages.
73
-
74
- ---
75
-
76
- ## Rate Limiting Testing
77
-
78
- | Aspect | Check |
79
- |--------|-------|
80
- | Existence | Is there any limit? |
81
- | Bypass | Headers, IP rotation |
82
- | Scope | Per-user, per-IP, global |
83
-
84
- **Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.
85
-
86
- ---
87
-
88
- ## GraphQL Security
89
-
90
- | Test | Focus |
91
- |------|-------|
92
- | Introspection | Schema disclosure |
93
- | Batching | Query DoS |
94
- | Nesting | Depth-based DoS |
95
- | Authorization | Field-level access |
96
-
97
- ---
98
-
99
- ## Security Testing Checklist
100
-
101
- **Authentication:**
102
- - [ ] Test for bypass
103
- - [ ] Check credential strength
104
- - [ ] Verify token security
105
-
106
- **Authorization:**
107
- - [ ] Test BOLA/IDOR
108
- - [ ] Check privilege escalation
109
- - [ ] Verify function access
110
-
111
- **Input:**
112
- - [ ] Test all parameters
113
- - [ ] Check for injection
114
-
115
- **Config:**
116
- - [ ] Check CORS
117
- - [ ] Verify headers
118
- - [ ] Test error handling
119
-
120
- ---
121
-
122
- > **Remember:** APIs are the backbone of modern apps. Test them like attackers will.
@@ -1,41 +0,0 @@
1
- # tRPC Principles
2
-
3
- > End-to-end type safety for TypeScript monorepos.
4
-
5
- ## When to Use
6
-
7
- ```
8
- ✅ Perfect fit:
9
- ├── TypeScript on both ends
10
- ├── Monorepo structure
11
- ├── Internal tools
12
- ├── Rapid development
13
- └── Type safety critical
14
-
15
- ❌ Poor fit:
16
- ├── Non-TypeScript clients
17
- ├── Public API
18
- ├── Need REST conventions
19
- └── Multiple language backends
20
- ```
21
-
22
- ## Key Benefits
23
-
24
- ```
25
- Why tRPC:
26
- ├── Zero schema maintenance
27
- ├── End-to-end type inference
28
- ├── IDE autocomplete across stack
29
- ├── Instant API changes reflected
30
- └── No code generation step
31
- ```
32
-
33
- ## Integration Patterns
34
-
35
- ```
36
- Common setups:
37
- ├── Next.js + tRPC (most common)
38
- ├── Monorepo with shared types
39
- ├── Remix + tRPC
40
- └── Any TS frontend + backend
41
- ```
@@ -1,22 +0,0 @@
1
- # Versioning Strategies
2
-
3
- > Plan for API evolution from day one.
4
-
5
- ## Decision Factors
6
-
7
- | Strategy | Implementation | Trade-offs |
8
- |----------|---------------|------------|
9
- | **URI** | /v1/users | Clear, easy caching |
10
- | **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |
11
- | **Query** | ?version=1 | Easy to add, messy |
12
- | **None** | Evolve carefully | Best for internal, risky for public |
13
-
14
- ## Versioning Philosophy
15
-
16
- ```
17
- Consider:
18
- ├── Public API? → Version in URI
19
- ├── Internal only? → May not need versioning
20
- ├── GraphQL? → Typically no versions (evolve schema)
21
- ├── tRPC? → Types enforce compatibility
22
- ```