Repository Analysis

ossec/ossec-hids

OSSEC is an Open Source Host-based Intrusion Detection System that performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response.

3.5 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of ossec/ossec-hids, a C project with 5,044 GitHub stars. SynthScan v2.0 examined 239,187 lines of code across 1115 source files, recording 660 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 3.5 places this repository in the Likely human-written band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

3.5
Adjusted Score
3.5
Raw Score
100%
Time Factor
2026-08-05
Last Push
5.0K
Stars
C
Language
239.2K
Lines of Code
1.1K
Files
660
Pattern Hits
2026-08-09
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 3MEDIUM 60LOW 597

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 660 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Over-Commented Block589 hits · 567 pts
SeverityFileLineSnippetContext
LOWinstall.sh1#!/bin/shCOMMENT
LOWinstall.sh761 AddWhiteCOMMENT
LOWcontrib/active-list.pl1#!/usr/bin/perlCOMMENT
LOWcontrib/ossec2mysql.pl1#!/usr/bin/perl -wCOMMENT
LOWcontrib/ossec2mysql.pl21#COMMENT
LOWcontrib/ossec2mysql.pl41# database=ossecbaseCOMMENT
LOWcontrib/ossec2mysql.pl61# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theCOMMENT
LOWcontrib/ossec-batch-manager.pl1#!/usr/bin/perlCOMMENT
LOWcontrib/ossec-batch-manager.pl21# the 'agent ID' wanting to be removed. Changed theCOMMENT
LOWcontrib/ossec-batch-manager.pl41# - changed the extract operation to store optionsCOMMENT
LOWcontrib/ossec2mysqld.pl1#!/usr/bin/perl -wCOMMENT
LOWcontrib/ossec2mysqld.pl21# as a simple script (ossec2mysql.pl).COMMENT
LOWcontrib/ossec2mysqld.pl41# dbhost=localhostCOMMENT
LOWcontrib/ossec2mysqld.pl61# but WITHOUT ANY WARRANTY; without even the implied warranty ofCOMMENT
LOWcontrib/ossectop.pl1#!/usr/bin/perl -wCOMMENT
LOWcontrib/ossectop.pl21# but WITHOUT ANY WARRANTY; without even the implied warranty ofCOMMENT
LOWcontrib/debian-packages/generate_ossec.sh1#!/bin/bashCOMMENT
LOWactive-response/firewall-drop.sh1#!/bin/shCOMMENT
LOWactive-response/nftables-drop.sh1#!/bin/shCOMMENT
LOWactive-response/cloudflare-ban.sh1#!/bin/shCOMMENT
LOWsrc/init/darwin-addusers.pl1#!/usr/bin/env perlCOMMENT
LOWsrc/os_maild/sendmail.c21#define VALIDBANNER "220"COMMENT
LOWsrc/os_maild/sendcustomemail.c21/* Default values used to connect */COMMENT
LOWsrc/os_maild/maild.h21#define DEFAULT_TIMEOUT 18 /* socket read timeout - 18 (*5)*/COMMENT
LOWsrc/os_maild/curlmail.c21#include <curl/curl.h>COMMENT
LOWsrc/os_maild/tests/maild_shutdown_gate_test.c1/* Copyright (C) 2026 Atomicorp, Inc.COMMENT
LOWsrc/os_crypto/sha256/sha256.c1#include <stdlib.h>COMMENT
LOWsrc/os_crypto/sha1/md32_common.h141#endifCOMMENT
LOWsrc/os_crypto/sha1/md32_common.h161#endifCOMMENT
LOWsrc/os_crypto/sha1/md32_common.h181/*COMMENT
LOWsrc/os_crypto/sha1/md32_common.h261/*COMMENT
LOWsrc/os_crypto/sha1/md32_common.h341#ifndef HOST_l2cCOMMENT
LOWsrc/os_crypto/sha1/sha_locl.h61COMMENT
LOWsrc/os_crypto/sha1/sha_locl.h101COMMENT
LOWsrc/os_crypto/sha1/sha_locl.h121# ifdef SHA1_ASMCOMMENT
LOWsrc/addagent/manage_agents.h81#define ADD_CONFIRM "Confirm adding it?(y/n): "COMMENT
LOWsrc/addagent/manage_agents.h141/* WIN32 errors */COMMENT
LOWsrc/os_xml/os_xml_internal.h21#define XML_VARIABLE_MAXSIZE 256COMMENT
LOWsrc/config/syscheck-config.h21#define CHECK_OWNER 0000010COMMENT
LOWsrc/config/csyslogd-config.h41#define SLOG_EMERG 0 /* system is unusable */COMMENT
LOWsrc/analysisd/analysisd.c21#include "os_execd/execd.h"COMMENT
LOWsrc/analysisd/analysisd.c41COMMENT
LOWsrc/analysisd/analysisd_stages.c21#include "eventinfo.h"COMMENT
LOWsrc/analysisd/pipeline.c21 * - Dual input demux (1 recv + N route workers) exceeds nested's single demux.COMMENT
LOWsrc/analysisd/pipeline.c41#include "state.h"COMMENT
LOWsrc/analysisd/eventinfo.h121 int memoryused;COMMENT
LOWsrc/analysisd/eventinfo.h141#define OSSEC_ALERT 12 /* OSSEC alerts */COMMENT
LOWsrc/analysisd/rules.h21#include "lists.h"COMMENT
LOWsrc/analysisd/rules.h41#define DO_MAILALERT 0x002COMMENT
LOWsrc/analysisd/rules.h261#define HOSTINFO_MODULE 15COMMENT
LOWsrc/tests/regressions/README.md1# Analysisd / pipeline regression testsCOMMENT
LOWsrc/tests/regressions/README.md21# - issue_1079_last_events_uaf frequency last_events ownershipCOMMENT
LOWsrc/tests/regressions/README.md41# - Migration checklist: inventory multi-agent frequency rules → convert toCOMMENT
LOWsrc/tests/regressions/README.md61# Wave 4 product planes (SCA/syscollector/winevt/dbsync/upgrade): deferred untilCOMMENT
LOWsrc/os_net/os_net.h21#ifndef AI_V4MAPPEDCOMMENT
LOWsrc/shared/file_op.c21#include <aclapi.h>COMMENT
LOWsrc/shared/file_op.c41#ifndef PRODUCT_BUSINESS_NCOMMENT
LOWsrc/shared/file_op.c61COMMENT
LOWsrc/shared/file_op.c81#endifCOMMENT
LOWsrc/shared/file_op.c101#define PRODUCT_ENTERPRISE_SERVER_C "Enterprise Edition (full) "COMMENT
529 more matches not shown…
Decorative Section Separators52 hits · 210 pts
SeverityFileLineSnippetContext
MEDIUMcontrib/active-list.pl19# -----------------------COMMENT
MEDIUMcontrib/active-list.pl21# -----------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl6# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl10# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl12# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl14# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl16# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl22# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl24# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl30# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl32# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl68# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl70# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl77# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl79# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl81# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl50# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl52# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl113# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysql.pl115# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl6# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl11## ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl13# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl15# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl17# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl23# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl25# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl31# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl33# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl69# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl71# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl78# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl80# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl82# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl51# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl53# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl114# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossec2mysqld.pl116# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl6# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl11# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl13# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl29# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl31# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl38# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl40# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl42# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl59# ---------------------------------------------------------------------------COMMENT
MEDIUMcontrib/ossectop.pl61# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/external/zlib-1.3.1/CMakeLists.txt88#============================================================================COMMENT
MEDIUMsrc/external/zlib-1.3.1/CMakeLists.txt90#============================================================================COMMENT
MEDIUMsrc/external/zlib-1.3.1/CMakeLists.txt197#============================================================================COMMENT
MEDIUMsrc/external/zlib-1.3.1/CMakeLists.txt199#============================================================================COMMENT
AI Response Leakage3 hits · 22 pts
SeverityFileLineSnippetContext
HIGH…ernal/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs263 /// <remarks>In this implementation, this method does nothing. This is because excessiveCOMMENT
HIGH…ernal/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs273 /// <remarks>In this implementation this property is not supported</remarks>COMMENT
HIGH…ernal/zlib-1.3.1/contrib/dotzlib/DotZLib/GZipStream.cs290 /// <remarks>In this implementation this property is not supported</remarks>COMMENT
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMsrc/init/osx105-addusers.sh63# Creating the groups.COMMENT
MEDIUMsrc/init/osx105-addusers.sh73# Creating the users.COMMENT
MEDIUMsrc/external/zlib-1.3.1/os400/make.sh164# Create the OS/400 library if it does not exist.COMMENT
MEDIUMsrc/external/zlib-1.3.1/os400/make.sh172# Create the DOCS source file if it does not exist.COMMENT
MEDIUMsrc/external/zlib-1.3.1/os400/make.sh194# Create the OS/400 source program file for the C header files.COMMENT
MEDIUMsrc/external/zlib-1.3.1/os400/make.sh205# Create the IFS directory for the C header files.COMMENT
Redundant / Tautological Comments6 hits · 9 pts
SeverityFileLineSnippetContext
LOWcontrib/debian-packages/generate_ossec.sh72# Check if element is in an arrayCOMMENT
LOWactive-response/firewalls/ipfw.sh50 # Check if our table is setCOMMENT
LOWsrc/os_dbd/dbmake.sh11 # Check if mysql_config is installed to use itCOMMENT
LOWsrc/os_dbd/dbmake.sh48 # Check if pg_config is installed to use itCOMMENT
LOWsrc/external/zlib-1.3.1/os400/make.sh66# Set LINK to "YES" if the module has been compiled.COMMENT
LOWsrc/agentlessd/scripts/register_host.sh59 # Check if the password was suppliedCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMsrc/tests/regressions/README.md41# - Migration checklist: inventory multi-agent frequency rules → convert toCOMMENT
Excessive Try-Catch Wrapping1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMcontrib/ossec_rules_list.py48 print ("Error: OSSEC rules directory does not appear to exist")CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/os_maild/tests/mail_utils_test.c62 assert(mail_safe_envelope_value("user@example.com", dst, sizeof(dst)) == 0);CODE
LOWsrc/os_maild/tests/mail_utils_test.c63 assert(strcmp(dst, "user@example.com") == 0);CODE