Commit 26c4e07
SHAdd0WTAka
security(workflows): fix script injection vulnerabilities (CodeQL alerts)
Fixes multiple 'Dangerous-Workflow' and 'Clear-text logging' alerts:
1. mcp/obsidian/server.py:
- Add mask_sensitive_data() helper
- Log masked versions of secrets to stderr
- Prevents clear-text logging of sensitive data
2. .github/workflows/zenclaw-discord.yml:
- Move all github.event.* variables to env section
- Prevents shell injection through commit messages, issue titles, etc.
- Add security comment explaining the pattern
3. .github/workflows/telegram-notifications.yml:
- Move all event data to job-level env variables
- Fixes injection in workflow names, issue titles, PR titles
4. .github/workflows/dependabot-auto-merge.yml:
- Move PR_TITLE to env variable
- Prevents injection through Renovate PR titles
Security: All github.event context values are now properly escaped by GitHub Actions
before being used in shell commands. See GitHub Security hardening guide:
https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions1 parent f74a82e commit 26c4e07
File tree
4 files changed
+85
-41
lines changed- .github/workflows
- mcp/obsidian
4 files changed
+85
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
68 | | - | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
39 | 60 | | |
40 | 61 | | |
41 | 62 | | |
42 | 63 | | |
43 | 64 | | |
44 | 65 | | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 66 | + | |
| 67 | + | |
52 | 68 | | |
53 | | - | |
| 69 | + | |
54 | 70 | | |
55 | 71 | | |
56 | | - | |
| 72 | + | |
57 | 73 | | |
58 | 74 | | |
59 | | - | |
| 75 | + | |
60 | 76 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 77 | + | |
| 78 | + | |
67 | 79 | | |
68 | | - | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | 83 | | |
72 | 84 | | |
73 | 85 | | |
74 | | - | |
| 86 | + | |
75 | 87 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
| 88 | + | |
| 89 | + | |
82 | 90 | | |
83 | | - | |
| 91 | + | |
84 | 92 | | |
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | 96 | | |
89 | | - | |
| 97 | + | |
90 | 98 | | |
91 | | - | |
92 | | - | |
| 99 | + | |
| 100 | + | |
93 | 101 | | |
94 | 102 | | |
95 | | - | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
63 | 79 | | |
64 | | - | |
| 80 | + | |
65 | 81 | | |
66 | 82 | | |
67 | 83 | | |
| |||
70 | 86 | | |
71 | 87 | | |
72 | 88 | | |
73 | | - | |
| 89 | + | |
74 | 90 | | |
75 | 91 | | |
76 | | - | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
83 | | - | |
| 99 | + | |
84 | 100 | | |
85 | 101 | | |
86 | | - | |
| 102 | + | |
87 | 103 | | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | | - | |
| 109 | + | |
94 | 110 | | |
95 | 111 | | |
96 | 112 | | |
97 | 113 | | |
98 | | - | |
| 114 | + | |
99 | 115 | | |
100 | 116 | | |
101 | 117 | | |
| |||
163 | 179 | | |
164 | 180 | | |
165 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
166 | 186 | | |
167 | 187 | | |
168 | | - | |
169 | | - | |
| 188 | + | |
| 189 | + | |
170 | 190 | | |
171 | 191 | | |
172 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| 93 | + | |
86 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
87 | 100 | | |
88 | 101 | | |
89 | 102 | | |
| |||
106 | 119 | | |
107 | 120 | | |
108 | 121 | | |
| 122 | + | |
| 123 | + | |
109 | 124 | | |
110 | 125 | | |
111 | 126 | | |
| |||
0 commit comments