generic.secrets.security.detected-sql-dump.detected-sql-dump
Community Favorite

Author
38,295
Download Count*
License
SQL dump detected
Run Locally
Run in CI
Defintion
rules:
- id: detected-sql-dump
pattern-regex: Dumping data for table `.*`
languages:
- regex
message: SQL dump detected
severity: ERROR
metadata:
cwe:
- "CWE-200: Exposure of Sensitive Information to an Unauthorized Actor"
category: security
technology:
- secrets
- sql
confidence: LOW
owasp:
- A01:2021 - Broken Access Control
references:
- https://owasp.org/Top10/A01_2021-Broken_Access_Control
cwe2021-top25: true
subcategory:
- audit
likelihood: LOW
impact: MEDIUM
license: Commons Clause License Condition v1.0[LGPL-2.1-only]
Examples
detected-sql-dump.txt
-- MySQL dump 10.13 Distrib 8.0.1, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: main
-- ------------------------------------------------------
-- Server version 8.0.12
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE TABLE IF NOT EXISTS `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) DEFAULT NULL,
`password` varchar(60) DEFAULT NULL,
`flag` tinyint(10) DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10001 ;
--
# ruleid: detected-sql-dump
-- Dumping data for table `users`
--
Short Link: https://sg.run/J3eR