this post was submitted on 17 Aug 2024
70 points (100.0% liked)

Linux

48209 readers
832 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Many projects ask to share lots of logs when reporting issues. It's difficult to go through all the logs and redact informarion such as usernames, environment variabled etc.

Any ideas on how to anonymize logs before sharing? Change your username to something generic?

you are viewing a single comment's thread
view the rest of the comments
[–] QuazarOmega@lemy.lol 13 points 3 months ago (3 children)

A tool would actually be so good to have, it's such a common thing that we don't even think about it much. You sparked my curiosity so I tried to search if there was one and it seems there is a project out there: loganon, though it's long dead unfortunately

[–] InEnduringGrowStrong@sh.itjust.works 20 points 3 months ago (2 children)

The problem is there's likely not a universal solution that's guaranteed to clean everything in every case.

Cleaning specific logs/configs is much easier when you know what you're dealing with.
Something like anonymizing a Cisco router config is easy enough because it folllows a known format that you can parse and clean.
Building a tool to anonymize some random logs from a specific software is one thing, anonymizing all logs from any software is unlikely.
Either way, it should always be double-checked and tailored to what's being logged.

[–] subtext@lemmy.world 4 points 3 months ago

I wonder if you could do something with heuristics or a micro LLM to flag words that might be expected to be private.

I would be curious if someone could do a proof of concept with the Ollama self-hosted model. Like if you feed it with examples of names, IP addresses, API-key-like-strings, and others, it might be able to read through the whole file and then flag anything with a risk level greater than some threshold.

[–] QuazarOmega@lemy.lol 4 points 3 months ago

I agree, besides basic patterns to search for, that will most likely be necessary. In fact looking a bit more at this tool, it has a list of "rules" tailored to each software specifically, I guess this could be sustainable really only if a repository of third party extensions was kept so that anyone could contribute and the pool of rules expanded progressively

[–] EuroNutellaMan@lemmy.world 2 points 3 months ago* (last edited 3 months ago)
  1. vim log

  2. :%s/yourusername/anonusername/g

  3. :%s/yourip/xxx.xxx.xxx.xxx/g

  4. :wq

[–] Maeve@kbin.earth -1 points 3 months ago

"boosted" this for visibility. Perhaps random devs will take interest.