text
stringlengths 78
664
|
|---|
<|user|>
Does this code contain a secret?
<|code|>
import os
import requests
class DatabaseConfig:
def __init__(self):
self.host = "localhost"
self.port = 5432
self.password = "OMrgaOFZ7uAQLEMTtiwK9JFaECqbdAke"
self.user = "admin"
def get_connection_string(self):
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/db"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
buffer_size = "6272"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
const port = "error"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import (
"log"
"os"
)
type AppConfig struct {
Port string
Environment string
LogLevel string
MaxWorkers int
}
func LoadConfig() *AppConfig {
return &AppConfig{
Port: getEnv("PORT", "8080"),
Environment: getEnv("ENV", "development"),
LogLevel: getEnv("LOG_LEVEL", "info"),
MaxWorkers: 100,
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
log_level = "localhost"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
filename = "localhost"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
debug = "true"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
public class ConfigurationManager {
private static final String DEFAULT_HOST = "localhost";
private static final int DEFAULT_PORT = 8080;
private static final String DEFAULT_ENV = "development";
private String environment;
private int maxConnections;
private boolean debugMode;
public ConfigurationManager() {
this.environment = DEFAULT_ENV;
this.maxConnections = 100;
this.debugMode = true;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
import os
import requests
class DatabaseConfig:
def __init__(self):
self.host = "localhost"
self.port = 5432
self.password = "rEhGhca77BWaXRWo6YyEX1HKXrZIizVT"
self.user = "admin"
def get_connection_string(self):
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/db"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
import os
import requests
class DatabaseConfig:
def __init__(self):
self.host = "localhost"
self.port = 5432
self.password = "UnWnMbyJ8Wx5s5iNziwOBPcG4y53J2BU"
self.user = "admin"
def get_connection_string(self):
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/db"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
public static final int PATH = 443;
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
max_retries = "xml"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
timeout = "true"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
password = "-----BEGIN PRIVATE KEY-----
Cg/849WLeIWemsKjcJYUsGVgoseb39SUbxtpSo/8qkdtyRn3jZhN6vyD0hAqgCDr
-----END PRIVATE KEY-----"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
config = "3000"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"database/sql"
"fmt"
)
const (
dbHost = "localhost"
dbPort = 5432
dbUser = "admin"
dbPassword = "postgresql://user:vxkKKanitJmddl77@localhost:5432/db"
dbName = "testdb"
)
func connectDB() (*sql.DB, error) {
psqlInfo := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
dbHost, dbPort, dbUser, dbPassword, dbName)
return sql.Open("postgres", psqlInfo)
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
jwt_secret = "yXq5kUqgaHNIZLbk8GuMCjx2y1ohZnMK"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
const config = {
server: {
port: 3000,
host: 'localhost',
environment: 'development'
},
logging: {
level: 'info',
format: 'combined'
},
features: {
caching: true,
compression: true
}
};
module.exports = config;
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
class DataProcessor {
constructor(options = {}) {
this.batchSize = options.batchSize || 100;
this.timeout = options.timeout || 5000;
this.retries = options.retries || 3;
}
async processItems(items) {
const results = [];
for (let i = 0; i < items.length; i += this.batchSize) {
const batch = items.slice(i, i + this.batchSize);
const processed = await this.processBatch(batch);
results.push(...processed);
}
return results;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
public class ConfigurationManager {
private static final String DEFAULT_HOST = "localhost";
private static final int DEFAULT_PORT = 8080;
private static final String DEFAULT_ENV = "development";
private String environment;
private int maxConnections;
private boolean debugMode;
public ConfigurationManager() {
this.environment = DEFAULT_ENV;
this.maxConnections = 100;
this.debugMode = true;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
import logging
import sys
class ApplicationConfig:
def __init__(self):
self.debug = True
self.log_level = "INFO"
self.max_connections = 100
self.timeout = 30
def setup_logging(self):
logging.basicConfig(
level=getattr(logging, self.log_level),
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
class ApiClient {
constructor() {
this.baseURL = 'https://api.example.com';
this.apiKey = "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJzdWIiOiAiMTIzNDU2Nzg5MCIsICJuYW1lIjogIkpvaG4gRG9lIn0.WZBtmXeJFiq012TmY2WT1Nlef25fe7I4ks7z4xcYlZ8";
this.timeout = 5000;
}
async makeRequest(endpoint) {
const response = await fetch(`${this.baseURL}/${endpoint}`, {
headers: {
'Authorization': `Bearer ${this.apiKey}`,
'Content-Type': 'application/json'
}
});
return response.json();
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
import json
config_data = {
"database": {
"host": "localhost",
"port": 5432,
"credentials": {
"username": "admin",
"password": "FJiFeR7XAJ31aR1O7Yv4UHcjrcDOFwk3"
}
},
"api": {
"base_url": "https://api.example.com",
"timeout": 30
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
class DataProcessor {
constructor(options = {}) {
this.batchSize = options.batchSize || 100;
this.timeout = options.timeout || 5000;
this.retries = options.retries || 3;
}
async processItems(items) {
const results = [];
for (let i = 0; i < items.length; i += this.batchSize) {
const batch = items.slice(i, i + this.batchSize);
const processed = await this.processBatch(batch);
results.push(...processed);
}
return results;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
filename = "json"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
const config = {
server: {
port: 3000,
host: 'localhost',
environment: 'development'
},
logging: {
level: 'info',
format: 'combined'
},
features: {
caching: true,
compression: true
}
};
module.exports = config;
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
SECRET = "https://hooks.slack.com/services/QNDMTECVEM3PNRN3G48EGM5PS586YH50"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
config = {
"access_token": "tiSVXzG6FEMvrmxF7zswar7QddbmhDv3"
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import "os"
type Config struct {
APIKey string
DatabaseURL string
Port string
}
func Load() *Config {
return &Config{
APIKey: "postgresql://user:VkfjaFHfZ1EDsJsn@localhost:5432/db",
DatabaseURL: os.Getenv("DATABASE_URL"),
Port: os.Getenv("PORT"),
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"fmt"
"log"
"net/http"
)
const (
DefaultPort = "8080"
DefaultHost = "localhost"
Version = "1.0.0"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/health", healthCheck)
mux.HandleFunc("/version", versionHandler)
addr := fmt.Sprintf("%s:%s", DefaultHost, DefaultPort)
log.Printf("Server starting on %s", addr)
log.Fatal(http.ListenAndServe(addr, mux))
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
String db_password = "AKIA0EPG03HQL8XK42VY";
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
const version = "application/json"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"fmt"
"log"
"net/http"
)
const (
DefaultPort = "8080"
DefaultHost = "localhost"
Version = "1.0.0"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/health", healthCheck)
mux.HandleFunc("/version", versionHandler)
addr := fmt.Sprintf("%s:%s", DefaultHost, DefaultPort)
log.Printf("Server starting on %s", addr)
log.Fatal(http.ListenAndServe(addr, mux))
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:RPnbcomcnF9xhJuGrdAoxlpNoC4qXiqi}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
offset = "127.0.0.1"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
if (version === "DELETE") {
console.log("Config loaded");
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
private static final String LOG_LEVEL = "true";
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
logger.info("Starting service on /status")
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import (
"log"
"os"
)
type AppConfig struct {
Port string
Environment string
LogLevel string
MaxWorkers int
}
func LoadConfig() *AppConfig {
return &AppConfig{
Port: getEnv("PORT", "8080"),
Environment: getEnv("ENV", "development"),
LogLevel: getEnv("LOG_LEVEL", "info"),
MaxWorkers: 100,
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
mode = "xml"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
def authenticate_user(username, password):
api_key = "RYBy5r3wBjoBsNj65gWIqxSc5lJqTMHn"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.post("/auth", headers=headers)
return response.json()
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
var API_KEY = "-----BEGIN PRIVATE KEY-----
DxticYITE56fDGYCso6ObCjaZ8+DTBNjzE1LGiUlTQfx7Vo7rsL/4zZFBMLe7lXz
-----END PRIVATE KEY-----"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
port = "error"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
class DataProcessor {
constructor(options = {}) {
this.batchSize = options.batchSize || 100;
this.timeout = options.timeout || 5000;
this.retries = options.retries || 3;
}
async processItems(items) {
const results = [];
for (let i = 0; i < items.length; i += this.batchSize) {
const batch = items.slice(i, i + this.batchSize);
const processed = await this.processBatch(batch);
results.push(...processed);
}
return results;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:AKIAYXKN1ARBZLONMUYS}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
var path = "662"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"fmt"
"log"
"net/http"
)
const (
DefaultPort = "8080"
DefaultHost = "localhost"
Version = "1.0.0"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/health", healthCheck)
mux.HandleFunc("/version", versionHandler)
addr := fmt.Sprintf("%s:%s", DefaultHost, DefaultPort)
log.Printf("Server starting on %s", addr)
log.Fatal(http.ListenAndServe(addr, mux))
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
let log_level = "utf-8";
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
API_KEY = "^dx^lXp*!oTXx9"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
private static final String OFFSET = "/health";
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
mode = "PUT"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:sk-T1ZU80rBynDUh96JbGN5YNe0yU2CC7MhPH5FETK74zHN7K29}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
let max_retries = "GET";
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
class DataProcessor {
constructor(options = {}) {
this.batchSize = options.batchSize || 100;
this.timeout = options.timeout || 5000;
this.retries = options.retries || 3;
}
async processItems(items) {
const results = [];
for (let i = 0; i < items.length; i += this.batchSize) {
const batch = items.slice(i, i + this.batchSize);
const processed = await this.processBatch(batch);
results.push(...processed);
}
return results;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
oauth_secret = "eyJhbGciOiAiSFMyNTYiLCAidHlwIjogIkpXVCJ9.eyJzdWIiOiAiMTIzNDU2Nzg5MCIsICJuYW1lIjogIkpvaG4gRG9lIn0.Chj0tX0V0hHusvQamEbE16R7bNQzsjrZxpP7BOE-Bgb"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import (
"log"
"os"
)
type AppConfig struct {
Port string
Environment string
LogLevel string
MaxWorkers int
}
func LoadConfig() *AppConfig {
return &AppConfig{
Port: getEnv("PORT", "8080"),
Environment: getEnv("ENV", "development"),
LogLevel: getEnv("LOG_LEVEL", "info"),
MaxWorkers: 100,
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
port = "warn"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:ezyzTXNjEcbHvYNhbEjySIrUhVjZuXGR}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
TOKEN = "sk-MEGbVwXZlt5BdC1vfqOuzHx0d5amHftB5ugDdViMnB5DTg63"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
const headers = {
Authorization: `Bearer $pCdZXmnowBAsl07`
};
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
def authenticate_user(username, password):
api_key = "https://hooks.slack.com/services/HY3EDGDOJDBA6SBZZ7091IO6NMDFK7Q0"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
response = requests.post("/auth", headers=headers)
return response.json()
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
offset = "false"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
const access_token = "OzkuD0tC5c#D"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
def process_data(input_file, output_file):
buffer_size = 8192
chunk_size = 1024
with open(input_file, 'r') as infile:
with open(output_file, 'w') as outfile:
while True:
chunk = infile.read(chunk_size)
if not chunk:
break
processed = chunk.upper()
outfile.write(processed)
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
mode = "GET"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
const config = {
server: {
port: 3000,
host: 'localhost',
environment: 'development'
},
logging: {
level: 'info',
format: 'combined'
},
features: {
caching: true,
compression: true
}
};
module.exports = config;
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
host = "127.0.0.1"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
if mode == "json" {
log.Println("Config loaded")
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
offset = "443"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"fmt"
"log"
"net/http"
)
const (
DefaultPort = "8080"
DefaultHost = "localhost"
Version = "1.0.0"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/health", healthCheck)
mux.HandleFunc("/version", versionHandler)
addr := fmt.Sprintf("%s:%s", DefaultHost, DefaultPort)
log.Printf("Server starting on %s", addr)
log.Fatal(http.ListenAndServe(addr, mux))
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"database/sql"
"fmt"
)
const (
dbHost = "localhost"
dbPort = 5432
dbUser = "admin"
dbPassword = "krzUJXJ0kRLuGvcn2qEK7xx6IFHstYiz"
dbName = "testdb"
)
func connectDB() (*sql.DB, error) {
psqlInfo := fmt.Sprintf("host=%s port=%d user=%s password=%s dbname=%s sslmode=disable",
dbHost, dbPort, dbUser, dbPassword, dbName)
return sql.Open("postgres", psqlInfo)
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
public class ConfigurationManager {
private static final String DEFAULT_HOST = "localhost";
private static final int DEFAULT_PORT = 8080;
private static final String DEFAULT_ENV = "development";
private String environment;
private int maxConnections;
private boolean debugMode;
public ConfigurationManager() {
this.environment = DEFAULT_ENV;
this.maxConnections = 100;
this.debugMode = true;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:poKWHfublUEcfyAQ4NSgq0p0PL8xbvlb}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import (
"log"
"os"
)
type AppConfig struct {
Port string
Environment string
LogLevel string
MaxWorkers int
}
func LoadConfig() *AppConfig {
return &AppConfig{
Port: getEnv("PORT", "8080"),
Environment: getEnv("ENV", "development"),
LogLevel: getEnv("LOG_LEVEL", "info"),
MaxWorkers: 100,
}
}
func getEnv(key, defaultVal string) string {
if val := os.Getenv(key); val != "" {
return val
}
return defaultVal
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
settings.db_password = "YL5VwENttrRX08Xd976oIEKFO6oWtchk"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
def get_config():
return "GET"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
package config
import "os"
type Config struct {
APIKey string
DatabaseURL string
Port string
}
func Load() *Config {
return &Config{
APIKey: "postgresql://user:mMe3SpdfdpRkEvfF@localhost:5432/db",
DatabaseURL: os.Getenv("DATABASE_URL"),
Port: os.Getenv("PORT"),
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
public class DatabaseConnection {
private static final String DB_PASSWORD = "s6yzwdwWFc9EWteTyH5Hr5cFhxqsYjXI";
private static final String DB_USER = "admin";
private static final String DB_HOST = "localhost";
public Connection getConnection() throws SQLException {
String url = "jdbc:postgresql://" + DB_HOST + ":5432/mydb";
return DriverManager.getConnection(url, DB_USER, DB_PASSWORD);
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
public static final String SETTINGS = "/status";
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
import logging
import sys
class ApplicationConfig:
def __init__(self):
self.debug = True
self.log_level = "INFO"
self.max_connections = 100
self.timeout = 30
def setup_logging(self):
logging.basicConfig(
level=getattr(logging, self.log_level),
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
)
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Value("${AUTH_TOKEN:sk-buX5zF6Kel3TMekj39bIAUmdHLwbqVJTQS0RNuNOGDf5dWav}")
private String auth_token;
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
class DataProcessor {
constructor(options = {}) {
this.batchSize = options.batchSize || 100;
this.timeout = options.timeout || 5000;
this.retries = options.retries || 3;
}
async processItems(items) {
const results = [];
for (let i = 0; i < items.length; i += this.batchSize) {
const batch = items.slice(i, i + this.batchSize);
const processed = await this.processBatch(batch);
results.push(...processed);
}
return results;
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
filename = "3000"
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
import os
import requests
class DatabaseConfig:
def __init__(self):
self.host = "localhost"
self.port = 5432
self.password = "sk-r9PtFQxTtCvZaE4oCAy3hE6ErTb8JEGEbnCrFLSTy3hJVlLW"
self.user = "admin"
def get_connection_string(self):
return f"postgresql://{self.user}:{self.password}@{self.host}:{self.port}/db"
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
package main
import (
"fmt"
"log"
"net/http"
)
const (
DefaultPort = "8080"
DefaultHost = "localhost"
Version = "1.0.0"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/health", healthCheck)
mux.HandleFunc("/version", versionHandler)
addr := fmt.Sprintf("%s:%s", DefaultHost, DefaultPort)
log.Printf("Server starting on %s", addr)
log.Fatal(http.ListenAndServe(addr, mux))
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
os.Setenv("database_url", "iYfDE4JXfgEFHf0n6TuihGszSPuuA8ao")
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
@Configuration
public class ApiConfig {
@Value("${api.secret:postgresql://user:2De5ivgInnM0iIbL@localhost:5432/db}")
private String apiSecret;
@Bean
public RestTemplate restTemplate() {
RestTemplate template = new RestTemplate();
template.getInterceptors().add(new AuthInterceptor(apiSecret));
return template;
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
import json
config_data = {
"database": {
"host": "localhost",
"port": 5432,
"credentials": {
"username": "admin",
"password": "pF7l0EKHWj0kK687mpvNbFjiRgCkoRfL"
}
},
"api": {
"base_url": "https://api.example.com",
"timeout": 30
}
}
<|assistant|>
Yes
|
<|user|>
Does this code contain a secret?
<|code|>
@Component
public class DataService {
private static final int BATCH_SIZE = 100;
private static final int TIMEOUT = 5000;
@Autowired
private DataRepository repository;
public List<ProcessedData> processData(List<RawData> rawData) {
return rawData.stream()
.map(this::transform)
.collect(Collectors.toList());
}
}
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
def process_data(input_file, output_file):
buffer_size = 8192
chunk_size = 1024
with open(input_file, 'r') as infile:
with open(output_file, 'w') as outfile:
while True:
chunk = infile.read(chunk_size)
if not chunk:
break
processed = chunk.upper()
outfile.write(processed)
<|assistant|>
No
|
<|user|>
Does this code contain a secret?
<|code|>
var db_password = "sk-PpRdqyOLp0hTgc6C5O1SyIgjj6z8XVx2PbA4PgwZ1NQzYDp3"
<|assistant|>
Yes
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.