fix: na-report crowdsec_count double-emit breaks --json (cscli present, 0 decisions)#12
Merged
Conversation
На нодах, где cscli установлен, но 0 решений, `grep -c '"value"' || echo 0` печатал "0\n0" (grep -c выводит 0 и выходит с кодом 1 → срабатывал `|| echo 0`), встраивая перевод строки в JSON → `na-report --json` становился невалидным, панель не подхватывала форензику такой ноды (поймано на de2). Теперь значение захватывается в переменную → ровно одно целое. ci: smoke проверяет, что `na-report --json` — ровно одна строка (ловит класс багов с встроенным переводом строки в JSON). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
grep -c '"value"' || echo 0печатал0\n0на нодах с cscli и 0 решений → битыйna-report --json→ панель не подхватывала форензику (поймано на de2). Фикс: захват в переменную, ровно одно целое. CI: проверка, чтоna-report --json— одна строка.🤖 Generated with Claude Code