Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Trap Streets for Code: How Mapmakers Caught Copiers, and How I Do It in Git

In the 1920s, two mapmakers at General Drafting, Otto G. Lindberg and Ernest Alpers, put a town on their map of New York that didn't exist. They called it Agloe, an anagram of their initials, and placed it at a dirt-road crossing in the Catskills. The idea was simple: if Agloe ever showed up on someone else's map, that someone had copied theirs. It did. Agloe turned up on a Rand McNally map. When…

In the 1920s, two mapmakers named Otto G. Lindberg and Ernest Alpers placed a fictitious town called Agloe on their map of New York. The town's purpose was to serve as a trap for anyone who copied their map. Over half a century later, the trap streets concept has evolved, with mapmakers using similar tactics to catch code copiers.

Git history may prove what code a user has committed, but it cannot reveal what code exists elsewhere, unbeknownst to the user. To address this issue, a developer built a tool called TrapR, which utilizes three layers of evidence: markers, canaries, and fingerprints. The markers, akin to the fictional town of Agloe, are unique identifiers planted in source files.

The canaries, similar to the fictional character Lillian Virginia Mountweazel, are small, legitimate-looking functions that, when deleted, break the application. The fingerprints, reminiscent of the road widths that Ordnance Survey used to identify copied maps, analyze the structure of code, such as the sequence of loops, conditionals, and functions, to detect any unauthorized modifications.

TrapR is an open-source Python tool designed to help developers monitor and protect their code across multiple repositories. It functions as a merge gate, automatically marking files with markers and updating a private vault containing the necessary keys. By employing this multi-layered approach, TrapR aims to provide developers with a reliable method for detecting and preventing code duplication.

Rewritten by urgent.news; may contain errors — check the original.

Read the original at dev.to →

Report a problem with this story

More in Tech

Short Stints & Contract Hops: Framing a Choppy Timeline

The resume that worries people most in this series is not the one with a gap. It is the one with too many entries. Eight months at a startup that ran out of money.

  • Multiple short stints at startups and contracts create choppy timeline
  • Normalize dates using consistent format for ATS parsing
  • Group contract work under one umbrella entry with neutral reason

Kubelet readOnlyPort is an unauthenticated cluster inventory path

Kubelet readOnlyPort is an unauthenticated cluster inventory path The kubelet has a read-only port that serves requests with no authentication or authorization.

  • Kubelet's readOnlyPort is unauthenticated, exposing cluster inventory.
  • Default configuration lacks authentication, often overlooked.
  • Kubernetes advises disabling this port for enhanced security.

Upgrading Old PHP Versions Safely With Rector and CI

In almost every legacy PHP project Loop Origin takes on, the first question is the same: which PHP version is production on?

  • Identify current PHP version in production
  • Use tools PHPCompatibility, PHPStan, Rector for upgrade
  • Employ CI to run tests on both versions

Capacitor vs No-Code Wrappers: Shipping Your Web App to iOS and Android in 2026

You have a web app. Users keep asking for "the app". Rewriting everything in Swift and Kotlin is out of the question. So you wrap it.

  • Capacitor requires manual setup and native feature integration
  • No-code wrappers like Glideep provide quick, cost-effective app deployment
  • Both methods face app review challenges, requiring native navigation and offline screens

More from Saturday 21 November →