Security Warnings

March 31, 2026 ยท View on GitHub

duck_net proactively warns about potentially insecure configurations. Warnings are informational -- they never block operations -- ensuring CI pipelines, airgapped systems, and development environments continue to work.

Viewing Warnings

-- View all warnings from the current session
FROM duck_net_security_warnings();

-- Returns: code, severity, cwe, protocol, message

Warning Codes

CRITICAL Severity

CodeProtocolDescription
TOKEN_OVER_HTTP_CONSULConsulAuth token sent over plaintext HTTP
TOKEN_OVER_HTTP_VAULTVaultAuth token sent over plaintext HTTP
TOKEN_OVER_HTTP_INFLUXDBInfluxDBAuth token sent over plaintext HTTP
TOKEN_OVER_HTTP_ESElasticsearchAuth token sent over plaintext HTTP
REVOKED_CERTIFICATETLSOCSP check confirmed the certificate has been revoked (CWE-295)

HIGH Severity

CodeProtocolDescription
S3_OVER_HTTPS3S3 endpoint uses http:// instead of https://
HTTP_REDIRECT_HTTPS_TO_HTTPHTTPRedirect chain downgraded from HTTPS to HTTP
SECRET_VALUE_EXPOSEDSecretsduck_net_secret(name, key) returned a raw credential
PLAINTEXT_MQTTMQTTPlaintext MQTT connection (use mqtts://)
PLAINTEXT_REDISRedisPlaintext Redis connection (use rediss://)
PLAINTEXT_FTPFTPPlaintext FTP connection (use ftps://)
PLAINTEXT_LDAPLDAPPlaintext LDAP connection (use ldaps://)
PLAINTEXT_LDAP_BINDLDAPCredentials sent over plaintext LDAP bind
PLAINTEXT_IMAPIMAPPlaintext IMAP connection (use imaps://)
PLAINTEXT_AMQPAMQPPlaintext AMQP connection (use amqps://)
PLAINTEXT_KAFKAKafkaPlaintext Kafka connection
PLAINTEXT_NATSNATSPlaintext NATS connection (use nats+tls://)
PLAINTEXT_WEBSOCKETWebSocketPlaintext WebSocket (use wss://)
PLAINTEXT_ZEROMQZeroMQNULL security mechanism (no encryption)
PLAINTEXT_SYSLOGSyslogUDP plaintext syslog
NO_AUTH_MEMCACHEDMemcachedNo built-in authentication
NO_AUTH_ZEROMQZeroMQNo built-in authentication

MEDIUM Severity

CodeProtocolDescription
SNMPV2C_WEAK_AUTHSNMPSNMPv2c plaintext community strings
IPMI_V15_NO_AUTHIPMIIPMI v1.5 with no authentication
TOFU_SSHSSHTrust-On-First-Use host key verification
PERSISTENT_SECRET_UNENCRYPTEDSecretsDuckDB persistent secrets stored unencrypted on disk

Suppressing Warnings

For CI pipelines or environments where warnings are not actionable:

-- Suppress all security warnings
SELECT duck_net_set_security_warnings(false);

-- Re-enable (recommended for production)
SELECT duck_net_set_security_warnings(true);

-- Check whether warnings are currently enabled
SELECT duck_net_warnings_enabled();

-- Count how many warnings have been emitted this session
SELECT duck_net_warnings_count();

-- Clear accumulated warnings
SELECT duck_net_clear_security_warnings();

Warning Properties

  • Deduplicated: Each warning code is emitted only once per session
  • Non-blocking: Warnings never prevent operations from completing
  • Auditable: All warnings can be queried via the table function
  • Suppressible: Global toggle for environments where warnings are not needed

Using Warnings in Production

Best practice is to review warnings after each session:

-- Check for any warnings after your workflow
FROM duck_net_security_warnings();

-- Check complete security posture
SELECT duck_net_security_status();

Address all CRITICAL warnings before deploying to production. HIGH warnings should be reviewed and either mitigated (by switching to TLS) or accepted with documented justification.