wormclaude 1.0.169 → 1.0.171
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/dist/commands.js +9 -6
- package/dist/theme.js +1 -1
- package/package.json +1 -1
package/dist/commands.js
CHANGED
|
@@ -172,7 +172,7 @@ const _REMED = {
|
|
|
172
172
|
'open-redirect': { t: 'Açık Yönlendirme', cwe: 'CWE-601', impact: 'Oltalama/phishing — kullanıcı güvenilen alandan kötücül siteye yönlenir.', fix: 'Yönlendirme hedefini allowlist’le; harici URL’e doğrudan yönlendirme yapma.' },
|
|
173
173
|
crlf: { t: 'CRLF / HTTP Başlık Enjeksiyonu', cwe: 'CWE-113', impact: 'Başlık enjeksiyonu, önbellek zehirleme, oturum sabitleme.', fix: 'Yanıt başlığına giren girdiden CR/LF (%0d%0a) temizle.' },
|
|
174
174
|
'graphql-introspection': { t: 'GraphQL Introspection Açık', cwe: 'CWE-200', impact: 'Tüm API şeması/gizli uçlar ifşa → saldırı yüzeyi haritalanır.', fix: 'Üretimde introspection’ı kapat; şema ifşasını sınırla.' },
|
|
175
|
-
path: { t: '
|
|
175
|
+
path: { t: 'Keşfedilen uç/dosya', cwe: '', impact: 'Erişilebilir bir uç bulundu; içerik hassas değilse risk DÜŞÜKTÜR (robots.txt/sitemap/login normaldir, 403 = korumalı).', fix: 'Beklenmeyen/hassas yolları kaldır ya da erişimi kısıtla.' },
|
|
176
176
|
weak_headers: { t: 'Eksik Güvenlik Başlıkları', cwe: 'CWE-693', impact: 'Clickjacking/MIME-sniffing/MITM riskini artırır.', fix: 'CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy ekle.' },
|
|
177
177
|
cors: { t: 'CORS Yanlış Yapılandırması', cwe: 'CWE-942', impact: 'Kötücül site kullanıcı adına yetkili istek yapabilir, veri çalar.', fix: 'Origin’i allowlist’le; ACAO:* + credentials birlikte kullanma.' },
|
|
178
178
|
exposure: { t: 'Hassas Dosya İfşası', cwe: 'CWE-538', impact: 'Sır/yapılandırma sızması (.git/.env/yedek).', fix: 'Dosyaları web kökünden kaldır; erişimi engelle; sızan sırları rotate et.' },
|
|
@@ -210,7 +210,7 @@ export function buildReport(scan) {
|
|
|
210
210
|
out.push(`- **${L ? 'Kanıt' : 'Evidence'}:** ${f.evidence}`);
|
|
211
211
|
else if (f.missing)
|
|
212
212
|
out.push(`- **${L ? 'Eksik' : 'Missing'}:** ${(f.missing || []).join(', ')}`);
|
|
213
|
-
if (r) {
|
|
213
|
+
if (r && f.severity !== 'info') { // info bulgularda alarm-etkisi/çözüm gösterme (gürültü)
|
|
214
214
|
out.push(`- **${L ? 'Etki' : 'Impact'}:** ${r.impact}`);
|
|
215
215
|
out.push(`- **${L ? 'Çözüm' : 'Remediation'}:** ${r.fix}`);
|
|
216
216
|
}
|
|
@@ -332,14 +332,17 @@ export function summarizeScan(target, findings) {
|
|
|
332
332
|
// Tarama sonucunu MODELİN context'ine ekle → kullanıcı tarama hakkında soru sorabilsin
|
|
333
333
|
// ("türkçe anlat", "neyi önce düzelteyim", "SSRF nedir"). assistant() sadece ekrana basar, geçmişe
|
|
334
334
|
// eklemez; bu yüzden model taramayı bilmiyordu. Özet + yüksek/orta bulgular eklenir (context şişmesin).
|
|
335
|
-
function injectScanContext(ctx, target, findings) {
|
|
335
|
+
function injectScanContext(ctx, target, findings, full = false) {
|
|
336
336
|
if (!findings || !findings.length)
|
|
337
337
|
return;
|
|
338
338
|
const imp = findings.filter((f) => ['critical', 'high', 'medium'].includes(f.severity)).slice(0, 40);
|
|
339
339
|
const note = summarizeScan(target, findings).join('\n') + (imp.length ? '\n' + imp.map(formatFinding).join('\n') : '');
|
|
340
|
+
// Tam tarama yapıldıysa modele bildir → "/fullscan'i TEKRAR önerme" (zaten koşuldu).
|
|
341
|
+
const hdr = full
|
|
342
|
+
? `[${tt('FULL scan result (all 16 scanners ran — do NOT suggest /fullscan again)', 'TAM tarama sonucu (16 tarayıcı koşuldu — /fullscan\'i TEKRAR ÖNERME)')} — ${target}]`
|
|
343
|
+
: `[${tt('Security scan result', 'Güvenlik tarama sonucu')} — ${target}]`;
|
|
340
344
|
try {
|
|
341
|
-
ctx.setHistory([...ctx.getHistory(),
|
|
342
|
-
{ role: 'assistant', content: `[${tt('Security scan result', 'Güvenlik tarama sonucu')} — ${target}]\n${note}` }]);
|
|
345
|
+
ctx.setHistory([...ctx.getHistory(), { role: 'assistant', content: `${hdr}\n${note}` }]);
|
|
343
346
|
}
|
|
344
347
|
catch { /* geçmiş güncellenemezse sessiz geç */ }
|
|
345
348
|
}
|
|
@@ -512,7 +515,7 @@ async function fullScanCmd(arg, ctx) {
|
|
|
512
515
|
lines.push(` … +${all.length - 60} ${tt('more', 'daha')}`);
|
|
513
516
|
}
|
|
514
517
|
ctx.assistant(lines.join('\n'));
|
|
515
|
-
injectScanContext(ctx, target, all); // model
|
|
518
|
+
injectScanContext(ctx, target, all, true); // full=true → model /fullscan'i tekrar önermez
|
|
516
519
|
}
|
|
517
520
|
// /exploit ve /harden — AKTİF tarama DEĞİL, model-üretim görevleri (PoC / YARA-Sigma yazar).
|
|
518
521
|
// Güçlü, yetkili-kapsam çerçevesiyle modele gider (skill gibi). Çıktı kullanıcının dilinde.
|
package/dist/theme.js
CHANGED