惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
Security @ Cisco Blogs
S
Secure Thoughts
Attack and Defense Labs
Attack and Defense Labs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recent Commits to openclaw:main
Recent Commits to openclaw:main
H
Hacker News: Front Page
博客园 - 叶小钗
H
Heimdal Security Blog
Microsoft Security Blog
Microsoft Security Blog
Forbes - Security
Forbes - Security
AI
AI
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Troy Hunt's Blog
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
爱范儿
爱范儿
GbyAI
GbyAI
The Last Watchdog
The Last Watchdog
TaoSecurity Blog
TaoSecurity Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
D
DataBreaches.Net
Recent Announcements
Recent Announcements
Schneier on Security
Schneier on Security
C
Cisco Blogs
美团技术团队
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
月光博客
月光博客
雷峰网
雷峰网
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
H
Hackread – Cybersecurity News, Data Breaches, AI and More
A
Arctic Wolf
B
Blog RSS Feed
Cisco Talos Blog
Cisco Talos Blog
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
V2EX - 技术
V2EX - 技术
Y
Y Combinator Blog
N
News and Events Feed by Topic
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Security Archives - TechRepublic
Security Archives - TechRepublic
G
GRAHAM CLULEY
Jina AI
Jina AI
Hugging Face - Blog
Hugging Face - Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
The Hacker News
The Hacker News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
8 architectural bugs we found auditing 29 microservices (with code)
Tiana · 2026-05-09 · via DEV Community

We audited a 29-service Kotlin/Spring + Go + React platform. Found 14 issues - 8 already in our release branch on the way to QA. Sharing all 8 with file paths, code snippets, and exact fixes. The pattern at the end: dev environment masks, healthcheck lies, silent fallback to defaults, config drift between two places.

If you're going to grep your codebase after reading this, the four greps to start with are at the bottom.


1. ML weights missing from the Docker image

Symptom: prediction endpoint returns 500 in k8s. Locally fine. CI passes.

Root cause chain:

ml-api-service/.gitignore:58   →  models/         # excluded
ml-api-service/.dockerignore   →  missing
ml-api-service/Dockerfile:35   →  COPY models/ ./models/
docker-compose.yml:976         →  ./ml-api-service/models:/app/models  (bind mount)

Enter fullscreen mode Exit fullscreen mode

When .dockerignore is absent, Docker BuildKit falls back to .gitignore. models/ is excluded from the build context. COPY models/ copies an empty directory. The bind mount in docker-compose hides this locally.

The lying healthcheck:

@app.get("/ready")
async def ready():
    return {"status": "ok"}  # TODO: real check

Enter fullscreen mode Exit fullscreen mode

Fix: explicit .dockerignore, track weights in git, real readiness probe:

@app.get("/ready")
async def ready():
    model_dir = Path("/app/models")
    if not any(model_dir.glob("*.joblib")) and not any(model_dir.glob("*.onnx")):
        raise HTTPException(status_code=503, detail="No models loaded")
    return {"models_loaded": len(list(model_dir.iterdir()))}

Enter fullscreen mode Exit fullscreen mode

Switch HEALTHCHECK in Dockerfile to /ready.


2. MapStruct + Kotlin is-prefix → silent false

Symptom: five mappers return false for every isActive, isDemoData, isIgMember, isSubscriptionActive, regardless of DB state.

Root cause: Kotlin compiles isActive into a getter named isActive() (no get prefix). MapStruct introspects the getter and reads the property as active. The DTO constructor expects isActive. Names don't match. MapStruct falls back to default. Build green, no warning.

Fix per field:

@Mapper(componentModel = "spring")
abstract class UserMapper {
    @Mapping(
        target = "isActive",
        expression = "java(entity.isActive())"
    )
    @Mapping(
        target = "isDemoData",
        expression = "java(entity.isDemoData())"
    )
    abstract fun toDto(entity: User): UserDto
}

Enter fullscreen mode Exit fullscreen mode

Fix permanent: in build.gradle.kts,

kapt {
    arguments {
        arg("mapstruct.unmappedTargetPolicy", "ERROR")
    }
}

Enter fullscreen mode Exit fullscreen mode

Compiler now fails on the next mismatch instead of swallowing.


3. Edge-agent default config: vessel-001 and insecure_skip_verify: true

Symptom: none yet - caught before first prod deploy.

The bad default:

# edge-agent/config.yaml
vessel_id: "vessel-001"
mqtt_broker: "tcp://mosquitto:1883"
cloud_url: "http://gateway:8080"
mongodb_uri: "mongodb://mongodb:27017"
tls:
  insecure_skip_verify: true

Enter fullscreen mode Exit fullscreen mode

Fix: split into two files. config.yaml (production template, empty placeholders, TLS strict) and config.demo.yaml (dev values). Refuse to start on bad placeholders:

func validateConfig(cfg *Config) error {
    if cfg.VesselID == "" {
        return errors.New("vessel_id is required")
    }
    if matched, _ := regexp.MatchString(`^vessel-\d+$`, cfg.VesselID); matched {
        return errors.New("vessel_id matches placeholder pattern, refusing to start")
    }
    if cfg.TLS.InsecureSkipVerify && !cfg.AllowInsecureFromCLI {
        return errors.New("insecure_skip_verify requires --allow-insecure-tls")
    }
    return nil
}

Enter fullscreen mode Exit fullscreen mode


4. Three different env-variable prefixes

Symptom: env-based configuration silently ignored. Found when somebody overrode MQTT_BROKER and the agent ignored it.

The drift:

// edge-agent/internal/config/config.go
viper.AutomaticEnv()
viper.SetEnvPrefix("AGENT")     // → AGENT_VESSEL_ID

Enter fullscreen mode Exit fullscreen mode

// edge-agent/cmd/edge-agent/cli/root.go
viper.BindEnv("vessel-id", "EDGE_VESSEL_ID")  // → EDGE_VESSEL_ID

Enter fullscreen mode Exit fullscreen mode

# docker-compose.yml
edge-agent:
  environment:
    EDGE_AGENT_VESSEL_ID: "v-042"   # → EDGE_AGENT_VESSEL_ID

Enter fullscreen mode Exit fullscreen mode

Fix: canonical prefix EDGE_AGENT_*, explicit binds for backward compat, integration test:

viper.BindEnv("vessel_id",
    "EDGE_AGENT_VESSEL_ID",  // canonical
    "AGENT_VESSEL_ID",       // legacy
    "EDGE_VESSEL_ID",        // legacy
)

Enter fullscreen mode Exit fullscreen mode

func TestEnvOverridesConfig(t *testing.T) {
    t.Setenv("EDGE_AGENT_VESSEL_ID", "test-vessel-99")
    cfg := loadConfig()
    if cfg.VesselID != "test-vessel-99" {
        t.Fatalf("env override ignored: got %q", cfg.VesselID)
    }
}

Enter fullscreen mode Exit fullscreen mode


5. One hypertable in two Postgres schemas

Symptom: dashboards show stale data. Logs clean. Continuous aggregates maintaining empty views.

The double-create:

-- docker/init-db/01_create_databases.sql
CREATE TABLE public.telemetry_values (...);
SELECT create_hypertable('public.telemetry_values', 'time_measured');

Enter fullscreen mode Exit fullscreen mode

-- ingest-service/db/changelog/001-init-schema.sql
CREATE TABLE ingest.telemetry_values (...);
SELECT create_hypertable('ingest.telemetry_values', 'time_measured');

Enter fullscreen mode Exit fullscreen mode

ingest writes to ingest.telemetry_values. The view unified_vessel_positions (created by init script) reads public.telemetry_values.

Fix: delete the public-schema table from the init script. Single source of truth = the service's own migrations.


6. WebClient calls with no timeouts, no circuit breakers

Symptom: when one service crash-loops, every caller's reactor worker pool parks on calls that won't return. Cascade.

The default:

// passage-service-client.kt
@Bean
fun passageWebClient() = WebClient.create("http://passage-service:8080")
// no responseTimeout, no connectTimeout

Enter fullscreen mode Exit fullscreen mode

Fix:

@Bean
fun passageWebClient(): WebClient {
    val httpClient = HttpClient.create()
        .responseTimeout(Duration.ofSeconds(5))
        .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 2000)
    return WebClient.builder()
        .baseUrl("http://passage-service:8080")
        .clientConnector(ReactorClientHttpConnector(httpClient))
        .build()
}

Enter fullscreen mode Exit fullscreen mode

Plus Resilience4j circuit breaker on critical paths:

@CircuitBreaker(name = "passage-service", fallbackMethod = "fallbackVoyagePlan")
suspend fun getVoyagePlan(vesselId: UUID): VoyagePlan {
    return passageWebClient.get()
        .uri("/voyage-plans/{vesselId}", vesselId)
        .retrieve()
        .awaitBody()
}

private fun fallbackVoyagePlan(vesselId: UUID, ex: Throwable): VoyagePlan =
    VoyagePlan.empty(vesselId)

Enter fullscreen mode Exit fullscreen mode


7. Eurostat GPKG can't open inside Spring Boot fat JAR

Symptom: passage-service crash-loops on @PostConstruct. Every downstream that calls it (see #6) cascades.

Root cause: searoute-core ships marnet.gpkg (SQLite) inside its JAR. SQLite needs a filesystem path. Spring Boot fat JAR is zip-inside-zip. SQLite can't open it.

Fix chain.

Gradle task to extract at build:

// passage-service/build.gradle.kts
val extractMarnetGpkg by tasks.registering(Copy::class) {
    val searouteJar = configurations.runtimeClasspath.get()
        .files
        .first { it.name.startsWith("searoute-core") }
    from(zipTree(searouteJar)) {
        include("marnet.gpkg")
    }
    into("$projectDir/src/main/resources/marnet/")
}

tasks.named("processResources") {
    dependsOn(extractMarnetGpkg)
}

Enter fullscreen mode Exit fullscreen mode

Runtime extraction in @PostConstruct:

@PostConstruct
fun init() {
    val target = Paths.get(workingDir, "marnet.gpkg")
    if (!Files.exists(target)) {
        javaClass.getResourceAsStream("/marnet/marnet.gpkg").use { input ->
            Files.copy(input!!, target)
        }
    }
    try {
        spatialIndex = loadFromGpkg(target.toString())
        eurostatAvailable = true
    } catch (e: Exception) {
        log.warn("Eurostat unavailable, falling back to bisection routing", e)
        eurostatAvailable = false
    }
}

Enter fullscreen mode Exit fullscreen mode

healthcheck start_period: 120s in docker-compose to give time for extraction.


8. Keycloak realm without fixed user IDs

Symptom: every fresh Keycloak deploy generates new user UUIDs. JWT.sub diverges from users.id in DB. Data isolation silently breaks.

The bad realm import:

{
  "users": [
    {
      "username": "admin",
      "email": "admin@example.com",
      "credentials": [{"type": "password", "value": "admin123"}]
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

Fix: pin id to match DB:

{
  "users": [
    {
      "id": "d0000000-0000-0000-0000-000000000003",
      "username": "admin",
      "email": "admin@example.com",
      "credentials": [{"type": "password", "value": "admin123"}]
    }
  ]
}

Enter fullscreen mode Exit fullscreen mode

DB migration must match:

INSERT INTO users (id, email)
VALUES ('d0000000-0000-0000-0000-000000000003', 'admin@example.com');

Enter fullscreen mode Exit fullscreen mode

Integration test that catches this:

@Test
fun `JWT sub matches pinned admin UUID`() {
    val token = loginAs("admin", "admin123")
    val sub = parseJwt(token).getClaim("sub").asString()
    assertEquals("d0000000-0000-0000-0000-000000000003", sub)
}

Enter fullscreen mode Exit fullscreen mode


The four greps

If you're auditing your own system after reading this, here's where to start.

# 1. What's in your image that isn't in build context?
diff <(cat .gitignore) <(cat .dockerignore)
find . -name Dockerfile -exec grep -H "COPY" {} \;

Enter fullscreen mode Exit fullscreen mode

# 2. What does your /health actually verify?
grep -rn "fun health\|/health" --include="*.kt" --include="*.py" --include="*.go"
# Look for stubs returning {"status":"ok"} unconditionally.

Enter fullscreen mode Exit fullscreen mode

# 3. Inter-service calls without timeouts
grep -rn "WebClient.create\|FeignClient\|RestTemplate(" --include="*.kt"
# Cross-check against responseTimeout / circuit breaker config.

Enter fullscreen mode Exit fullscreen mode

# 4. Configuration drift
grep -rn "ENV\|env\|prefix" --include="*.go" --include="*.yaml"
# Look for diverging prefixes/keys across config init, CLI, compose, and helm.

Enter fullscreen mode Exit fullscreen mode


What ties these together

Operationally, all eight are the same class of bug.

Some piece of the dev environment was filling in for what production wouldn't (bind mount, internal docker-compose DNS, exploded Gradle classpath, persistent dev DB). The healthcheck or build signal was reporting fine when the service wasn't. A library somewhere was defaulting silently - MapStruct to false, WebClient to an unbounded wait, Keycloak to a random UUID. Configuration was duplicated in two places and had drifted.

The four greps above are pointed at exactly those four. Run them.