今日已更新 200 条资讯 | 累计 27375 条内容
关于我们

今日精选

HOT

最新资讯

共 27375 篇
第 24/1369 页
AI 资讯 Dev.to

AI Agent Security: Stop Model Exfiltration and API Key Leaks

Why AI Agents Expand the Security Perimeter AI agents do more than generate text. They call tools, query databases, retrieve documents, execute code, and communicate with external services. Every connection introduces a potential path for model exfiltration or credential leakage. Model exfiltration includes direct theft of model weights, systematic extraction of proprietary behavior, and reconstruction of sensitive training data through repeated queries. Attackers may also inject instructions that persuade an agent to reveal system prompts, internal files, access tokens, or confidential context. API keys are especially vulnerable because agents often need credentials at runtime. If those secrets appear in prompts, logs, traces, exception messages, or tool outputs, a malicious user may be able to recover them. Conventional application controls remain necessary, but agentic systems require additional safeguards that account for probabilistic decisions and dynamic tool chains. Separate Agent Reasoning From Secrets Secrets should never be included directly in an agent’s prompt or long-term memory. Instead, place credentials in a dedicated secrets manager and expose narrowly scoped tool interfaces. The agent should request an approved action, while a trusted execution layer retrieves the required credential and performs the call. Use short-lived tokens, workload identities, and least-privilege permissions wherever possible. Each tool should have an explicit policy defining allowed endpoints, operations, data types, and request limits. An agent that can read customer records does not automatically need permission to export them or send them to an arbitrary domain. Prompt inputs and retrieved documents should also be treated as untrusted data. Apply content isolation, schema validation, and output filtering before information reaches an external tool. Redact credentials from telemetry and configure logs to record identifiers rather than raw authorization headers. These con

Deepbody 2026-08-01 23:53 5 原文
AI 资讯 Dev.to

LLD Data Structures in Design Context: The Heap Property — The Simple Rule That Makes Heaps Powerful

"A Heap doesn't stay useful because everything is sorted. It stays useful because every parent follows one simple rule." In the previous article, we learned that a Heap is built for continuous decision-making. Whether it's assigning the nearest driver, scheduling the next process, or selecting the most urgent support ticket, the system always needs one thing: The next best candidate But that raises an interesting question. How can a Heap always know the best candidate without sorting everything? The answer lies in one simple rule: The Heap Property. This single rule is what gives a Heap its power. The Biggest Misconception About Heaps Many beginners imagine a Heap like this. 100 95 90 82 76 64 51 Everything perfectly sorted. It feels logical. If the largest element should always come first, shouldn't every element be arranged in order? Surprisingly, no. A Heap solves a much smaller problem. It only guarantees that the best element is always easy to reach . Everything else only needs to follow one simple relationship. Imagine a Company Hierarchy Think about the structure of a company. CEO ↓ Engineering Director ↓ Engineering Manager ↓ Software Engineer The CEO doesn't directly manage every employee. Instead, each manager is responsible only for the people immediately below them. The entire organization works because every manager fulfills their local responsibility. A Heap works in a very similar way. Every node only needs to maintain the correct relationship with its immediate children. It doesn't need to know about every other node in the structure. The Heap Property Let's look at a Max Heap. 100 / \ 90 80 / \ / \ 75 60 70 50 Notice the pattern. Every parent has a value greater than or equal to its children. That's the Heap Property. Parent ≥ Children That's it. There is no rule saying that every node must be greater than every other node in the Heap. Only the parent-child relationship matters. What About a Min Heap? Some systems want the smallest value first. For

Saras Growth Space 2026-08-01 23:50 5 原文
开发者 Dev.to

The Unbuffered Channels In Go Lesson I Think Has Finally Clicked for Me 🤷🏽‍♂️

While struggling to understand channels in go, I would try out many things in my sandbox repository. I encountered deadlock errors and stuff about go routes being asleep. I came to understand that the order of execution played a role and that with unbuffered channels you need a sender and a receiver ready at the same time (kind of). I wrote a short article on my blog site about the experience The Unbuffered Channels In Go Lesson I Think Has Finally Clicked for Me 🤷🏽‍♂️

Rash Edmund 2026-08-01 23:45 5 原文
AI 资讯 Dev.to

LLD Data Structures in Design Context: Heap — A Data Structure Built for Continuous Decision Making

"A HashMap helps you find what you already know. A Heap helps you decide what should happen next." In the previous article, we discovered that not every software problem is about finding a specific object. Sometimes, the system already knows exactly what it's looking for. Find User ID = 1024 ↓ Return User Other times, the system doesn't know the answer in advance. Instead, it has to repeatedly answer questions like: Which task should run next? Which driver should be assigned? Which customer should be served first? Which alert is the most critical? These are fundamentally different problems. Instead of retrieving an object, the system is making a decision. This is where a Heap comes in. A Heap Is Built for Decisions, Not Searches Imagine you're managing a hospital emergency room. Patients keep arriving throughout the day. Patient A Minor Injury Patient B Heart Attack Patient C Broken Arm Patient D High Fever Should doctors treat patients in the order they arrived? Probably not. Instead, they ask one question. Who needs treatment first? Notice something important. The hospital isn't searching for a particular patient. It's choosing the highest-priority patient. A Heap is designed for exactly this kind of problem. A Different Way of Thinking When beginners hear "data structure," they often think about storing data. Experienced engineers think differently. They ask: "What operation does my system perform repeatedly?" If the answer is: Find User Find Order Find Product that's a lookup problem. But if the answer is: Choose Highest Priority Choose Nearest Driver Choose Earliest Deadline that's a decision problem. A Heap is optimized for continuous decision-making. What Exactly Is a Heap? A Heap is a data structure that keeps the most important element immediately available. Depending on the system, "most important" can mean different things. For example: Highest priority Lowest cost Earliest deadline Highest score Closest driver Most urgent ticket The Heap doesn't decide w

Saras Growth Space 2026-08-01 23:40 5 原文
开发者 Dev.to

React Mastery Series – Day 9: Event Handling in React – Making Applications Interactive

Welcome back to the React Mastery Series ! In the previous article, we explored React Rendering and Component Lifecycle . We learned: What causes a component to re-render How React reconciliation works The difference between rendering and DOM updates How lifecycle behavior is handled using Hooks Now let's learn how React applications respond to user interactions. Every modern application depends on events: Clicking buttons Typing into forms Selecting options Submitting data Dragging and dropping elements Keyboard shortcuts React provides a powerful event system to handle all these interactions. What is Event Handling? Event handling is the process of responding to user actions in an application. Examples: User Action | ↓ Event Triggered | ↓ Event Handler Executes | ↓ State Updated | ↓ UI Re-renders Example: A user clicks the "Transfer Money" button: Click Button | ↓ Handle Click Event | ↓ Validate Data | ↓ Call API | ↓ Update UI Events in Traditional JavaScript vs React Traditional JavaScript const button = document . getElementById ( " save " ); button . addEventListener ( " click " , saveData ); You manually: Find the DOM element Attach event listeners Manage updates React React attaches events directly inside JSX. < button onClick = { saveData } > Save </ button > React manages the event registration internally. React Event Syntax React events use: camelCase naming JSX expressions Function references HTML: <button onclick= "save()" > Save </button> React: < button onClick = { save } > Save </ button > Notice: onclick ❌ onClick ✅ Handling Click Events Example: function Button () { function handleClick () { console . log ( " Button clicked " ); } return ( < button onClick = { handleClick } > Click Me </ button > ); } When the user clicks: Click | ↓ handleClick() | ↓ Execute Logic Passing Functions vs Calling Functions A very common beginner mistake. Incorrect < button onClick = { handleClick () } > Save </ button > This executes immediately during rendering. Correc

Siva Samanthapudi 2026-08-01 23:32 4 原文
AI 资讯 Dev.to

LLD Data Structures in Design Context: Why Some Problems Need the "Best" Result Instead of Any Result

"Finding something quickly and finding the best thing quickly are two completely different engineering problems." So far in this series, we've explored one of the most common behaviours in software systems: Fast lookup. Whenever a system already knows what it's looking for—a User ID, Product ID, Order ID or Session ID—a HashMap becomes an excellent choice. But not every software problem works this way. Imagine you're building a ride-sharing application. A rider requests a cab. The system doesn't already know which driver to assign. Instead, it must answer a different question: "Out of all available drivers, who is the best choice?" Now consider a task scheduler. Hundreds of jobs are waiting to run. The scheduler doesn't ask: "Find Job #123." It asks: "Which job should run next?" Or imagine a gaming platform. Thousands of players are competing. Nobody asks: "Find Player ID 1057." Instead, users ask: "Who are the top 10 players?" These problems are fundamentally different from fast lookup. They're not about finding a specific object . They're about finding the best object according to some priority. This shift in thinking introduces another important design behaviour. Fast Lookup vs Best Selection Let's compare two different requirements. Requirement 1 Customer ID = 1052 ↓ Retrieve Customer The system already knows exactly what it needs. The challenge is retrieving it efficiently. Requirement 2 Available Drivers ↓ Find Nearest Driver ↓ Assign Ride The system doesn't know the answer yet. It must compare multiple candidates before making a decision. These two behaviours may look similar. In reality, they solve completely different engineering problems. Every Software System Doesn't Search the Same Way Consider these questions. Find Order #50231 versus Find the highest priority order. Or: Retrieve Product ID = P1042 versus Recommend the most popular product. Or: Find Employee ID = 2107 versus Find the employee with the highest sales this month. The first question always

Saras Growth Space 2026-08-01 23:30 5 原文
AI 资讯 Dev.to

My determinism test passed for months while the two builds played different games

I compiled the rules engine of a shipped Android game to the browser. Same Java, two compilers. Then I checked whether the two agreed. They did not — and the test I already had for exactly this had been green the whole time. The same command twice: green against the current engine, then against the committed recording of the broken build. Play it as a terminal session if you want to select the text. The setup The rules live in one module with no Android on its classpath, which is what let me compile them a second time with TeaVM and run the same logic on a canvas in a browser tab. A seeded run should be reproducible. Give the engine seed 42 and a fixed sequence of inputs, and you should get the same game every time — that is what makes a run replayable and two builds comparable. Here is what I actually got, same seed, same inputs: JVM browser first obstacle x, frame 60 405.426 304.426 still alive at frame 360 yes no final score 9 6 Not a rounding difference. A different game. The cause is boring. The test failure is not. GameEngine used java.util.Random . Its algorithm is specified down to the constants — you can read the exact linear congruential generator in the Javadoc. So a seed ought to name exactly one sequence. But my code was not running that algorithm. It was running whichever implementation the runtime supplied , and TeaVM's is not the JVM's. The specification describes what java.util.Random does; it does not force a foreign runtime's reimplementation to match. The fix took ten minutes: write the LCG out longhand so both builds execute the same arithmetic instead of trusting that they will. The interesting part is the test. The test that could not have caught it I had a test called theSameSeedProducesTheSameRun . It ran the engine twice, with the same seed, and asserted the results matched. It passed on every commit, including every commit during which the browser build was playing a different game. It had to pass. It runs the engine twice in the same runt

Erik Hill 2026-08-01 23:23 3 原文
开发者 The Verge AI

Trump blames Tim Walz for water hacks even though it’s probably Iran

The FBI, the EPA, and the Cybersecurity and Infrastructure Security Agency (CISA) have stopped short of officially blaming Iran for a spate of cyberattacks on Minnesota's water systems, but consensus is that Iran is likely behind them. That, of course, hasn't stopped Donald Trump from sharing his own theory - that Governor Tim Walz is […]

Terrence O’Brien 2026-08-01 23:23 5 原文