News for hackers. Stuff that matters.
Re:Show HN: CLI tool for saving web pages as a single file by FreeHugs on Friday August 23, 2019 @03:45AM (#20775325)
One thing I always wonder when I see native software posted here:

How do you guys handle the security aspect of executing stuff like this on your machines?

Skimming the repo it has about a thousand lines of code and a bunch of dependencies with hundreds of sub-dependencies. Do you read all that code and evaluate the reputation of all dependencies?

Do you execute it in a sandboxed environment?

Do you just hope for the best like in the good old times of the C64?

Re:Show HN: CLI tool for saving web pages as a single file by mike-cardwell on Friday August 23, 2019 @05:20AM (#20775755)
These are the install instructions the docs say to use:

    $ git clone https://github.com/Y2Z/monolith.git
    $ cd monolith
    $ cargo install
These are the ones I used:

    $ git clone https://github.com/Y2Z/monolith.git
    $ cd monolith
    $ sudo docker run --rm -w "$(pwd)" -v "$(pwd):$(pwd)" -u "$(id -u):$(id -g)" rust cargo install
That isolated the build process. Similar method to isolate the execution of the built project:

    $ cd target/release
    $ sudo docker run --rm -w "$(pwd)" -v "$(pwd):$(pwd)" -u "$(id -u):$(id -g)" rust ./monolith https://www.grepular.com
Slightly related: I released a project last night for easily running node applications inside containers: https://gitlab.com/mikecardwell/safernode - Without even having node or npm installed on the host system, you can still run commands like "npm install" or "npm start" to run node applications safely isolated inside ephemeral containers.
Re:Show HN: CLI tool for saving web pages as a single file by jolmg on Friday August 23, 2019 @11:33AM (#20778659)
Though I don't know the specifics, isn't it commonly advised to not rely on docker for secure isolation of potential malware?
Re:Show HN: CLI tool for saving web pages as a single file by mike-cardwell on Friday August 23, 2019 @11:59AM (#20778919)
I've heared this too, but as far as I know it's only because there are potential bugs in the container software that allow the malware to escape.

To me, this is kind of like saying you should just run stuff as root, because there might be a privelege escalation vulnerability which lets the code run as root anyway.

Correct me if I'm wrong.

My goal was to make things more secure, not completely secure.

Previously, dodgy libs could read (and add) ssh keys into ~/.ssh/, take over my NPM account by fetching ~/.npmrc, grab a copy of my ~/.bitcoin/wallet.dat, and add a keylogger into my ~/.bashrc

Now, at least it has to break out of docker first.

Re:Show HN: CLI tool for saving web pages as a single file by jolmg on Friday August 23, 2019 @12:07PM (#20779002)
> To me, this is kind of like saying you should just run stuff as root, because there might be a privelege escalation vulnerability which lets the code run as root anyway.

But I never said it was preferable to run directly on the host. There are other choices.

> My goal was to make things more secure, not completely secure.

There is no such thing as completely secure. The argument against docker is more along the lines of "is it really as secure as people think it is?"

> I've heared this too, but as far as I know it's only because there are potential bugs in the container software that allow the malware to escape.

I'm not sure docker was designed for the purpose of secure isolation, so if it fails to securely isolate, I'm not sure it would count as a bug.

Re:Show HN: CLI tool for saving web pages as a single file by cookiecaper on Friday August 23, 2019 @01:03PM (#20779717)
Linux relies on a concoction of properly-configured kernel subsystems to provide some level of isolation for containerized processes, and systems like LXD and Docker try to patch up the gaps.

The cgroups interfaces don't offer much security stuff directly -- they're mainly about containing groups of process within certain resource consumption quotas, and afaik, don't really attempt to contemplate secure isolation directly.

LXD approaches this by adding a uid/gid translation layer, so that the uid/gid for anything within an unprivileged container will be offset by a specified value, e.g., calls with user ID 1000 in a container are made to present to the host as user ID 1000000. This comes with its own host of issues which LXD tries to hide.

The short answer is that if security is any type of priority for the system in question and you want to run containerized processes, you should use an OS that implements container security directly in the kernel, like FreeBSD with jails or illumos with Zones, instead of depending on getting exactly the right configuration between all the moving pieces in the Linux container stack.

Re:Show HN: CLI tool for saving web pages as a single file by hollerith on Friday August 23, 2019 @07:49PM (#20783985)
I have no recent information, but about 10 years ago FreeBSD maintainers were telling people not to rely on jails for security.
Re:Show HN: CLI tool for saving web pages as a single file by geggam on Friday August 23, 2019 @12:48PM (#20779486)
A full VM seems somewhat of a better stance on this no ?
Re:Show HN: CLI tool for saving web pages as a single file by mike-cardwell on Tuesday August 27, 2019 @05:01AM (#20807540)
Only if you ignore why I'm doing this.

I could counter your "VM is better than container", with "Separate hardware is better than VM".

Re:Show HN: CLI tool for saving web pages as a single file by zymhan on Friday August 23, 2019 @11:54AM (#20778875)
It's certainly not as secure as a VM, without a lot of safeguards.
Re:Show HN: CLI tool for saving web pages as a single file by wolco on Friday August 23, 2019 @09:21AM (#20777240)
For someone having trouble with npm and windows 10, the suggestion couldn't come at a better time.
Re:Show HN: CLI tool for saving web pages as a single file by gambler on Friday August 23, 2019 @11:18AM (#20778516)
This is a good question. I think you can make it even better by generalizing the problem. How on earth do developers hope to advance general computing forward when simply running programs isn't a solved problem? Most software engineers I know don't run docker on their home PCs. What about people who aren't in IT? Does anyone here even care? The general attitude I see is "plebs don't need to run anything they can't get outside of an app store". It's a horrible attitude.

I very much like this quote from Alan Kay:

"It doesn't matter what the computer can do, if it can't be learned by billions of people."

There is no good technical reason why modern operating systems can't work out some some scheme for sanboxing arbitrary programs by default. It is obviously necessary. I imagine something like "applications" folder where every subfolder automatically becomes an isolated "container". It would have to be designed with security as the primary concern, though; unlike current container solutions.

Re:Show HN: CLI tool for saving web pages as a single file by derefr on Friday August 23, 2019 @12:08PM (#20779009)
But arbitrary programs are... arbitrary. Especially ones run by software engineers, and especially ones run by software engineers as part of a POSIX-alike “utility bag” ecosystem.

Who’s to say that the user’s intent by running the program they just downloaded, isn’t to—say—overwrite a system folder? (Oh, wait, that’s exactly what Homebrew does, with the user’s full intent behind it!)

There are tons of attempts to do what you’re talking about. Canonical’s “snaps” are a good example. As well, every OS sandboxes legacy apps by default (because they’re already virtualizing them, and sandboxing something in a virtualization layer is easy.)

But none of those solutions really work for the “neat FOSS hack script someone wrote” workflow we’re talking about here, where you build programs from source and run them for their intentional side-effects on your system.

You might suggest that there could be a shared sandbox for all the POSIX-like utilities to interoperate in. But what if you’re attempting to use those utilities against your real documents? (For example, a bulk metadata auto-tagging and auto-renaming utility, to get TV episodes from torrents loaded into Plex correctly.) How do you draw the line of what such a program can operate on? AFAICT, you just... can’t. Its whole purpose is to silently automate some task. If it requires constant security prompting, the task isn’t automated.

Re:Show HN: CLI tool for saving web pages as a single file by gambler on Friday August 23, 2019 @01:07PM (#20779781)
>But what if you’re attempting to use those utilities against your real documents?

You copy or move documents inside the specific sandbox.

If you want a pipeline, you establish a chain of inbox/outbox folders.

Obviously, most of this should be done by the OS, not the user.

The workflow:

- You click "download" in your browser.

- When it's done and you click on your download, the OS asks how you want to open it. Instead of "execute" option you get "run in a sandbox" option.

- You type in the name of the sandbox, the app gets copies to /apps/sandboxName or something of that sort.

- The system automatically creates /apps/sandboxName/inbox and /apps/sandboxName/outbox.

- To process a file in some way, you drop it into inbox dir.

For command line, the only change would be switching from "executable pulls arbitrary files" to "I push specific file to the executable".

  zip -r squash.zip dir1
becomes

  | -r squash.zip | zip dir1 |
Start pipeline. Push squash.zip as an argument to zip, get the output. Zip would be the container name.
Re:Show HN: CLI tool for saving web pages as a single file by derefr on Friday August 23, 2019 @02:01PM (#20780495)
Let me put it another way: how would you implement a dotfile management framework (like any of these: https://dotfiles.github.io)? Programmers seem to really like them, judging by how many of them there are. But the whole point of them is to forcefully usurp the assets of literally every other program on the system. They're user-level rootkits, in a sense.

Or, for a simpler, more obvious example: find(1), grep(1), etc. A set of utilities that can all be asked the equivalent of "read literally every file the VFS has access to and tell me whether they match an arbitrary-code-execution predicate." Do you want to literally copy your entire hard disk into the 'inbox' of these utilities, in order to get them to search it for you? (And before you say "well, we can trust the base utilities that ship with the OS to do more than arbitrary third-party utilities"—there's a whole competition of grep(1) replacements, e.g. ag(1), rg(1), etc. Do you want to make it impossible for people to innovate in this space?)

Or how about Nix, or GNU Stow, or, uh, Git? These utilities become useless if they have their own sandbox. Does your git worktree live in Git's sandbox? Vi's sandbox? The inability to make this distinction functional is why mobile OSes only have fullly-integrated IDEs!

Or how about shells themselves! (Or, equivalently, any scripting runtime, e.g. Ruby, Python, etc.) Should people not be allowed to install these from third parties?

Or, the most based example of all: make(1) [and its spiritual descendants], and the GNU autotools built atop it. How does ./configure work if you can't detect true properties of the target system, only of the sandbox you're in?

Re:Show HN: CLI tool for saving web pages as a single file by gambler on Friday August 23, 2019 @03:17PM (#20781478)
>"Do you want to literally copy your entire hard disk into the 'inbox' of these utilities, in order to get them to search it for you?"

Well, let's think about the goal here. grep reads files and outputs lines from those files. It needs full read access to everything you want to search. It does not need write access outside of its sandbox. It does not need direct access to network sockets, audio stuff and so on.

Is it unreasonable to create a readonly "view" of the filesystem inside grep's folder? Is it unreasonable to have "files" representing network access, microphone, audio? It will have visual representation in file manager without the need to create custom UI. It could be manipulated by drag-and-drop OR command line. More importantly: it's easy for users to understand. "This app lives in a box. You can put things in that box for the app to use."

>Does your git worktree live in Git's sandbox?

Yes? I mean, I currently have a folder called projects. All my git stuff is in there anyway.

>Vi's sandbox?

If you want multiple sandboxes to be able to operate on a directory, you create "views" for that directory (readonly or read/write) in multiple sandboxes. This shouldn't be some sort of mind-bending idea, considering Unix has symlinks, hardlinks, and mounted filesystems of all sorts.

>Or how about shells themselves! (Or, equivalently, any scripting runtime, e.g. Ruby, Python, etc.) Should people not be allowed to install these from third parties?

There is no reason why a Ruby executable should have unlimited access to the entire file system. Especially if you're only using it for a specific purpose, like serving a website.

What I'm describing here isn't some novel, mind-blowing idea. It's simply dependency injection. With file-based user interface. Every single part of this had been done in various operating systems or programming environments more than once. It's just a matter of combining it all in a sensible way.

Re:Show HN: CLI tool for saving web pages as a single file by JetSpiegel on Saturday August 24, 2019 @04:22PM (#20789484)
> It does not need write access outside of its sandbox.

You have SElinux for that, if you like bureaucracy and filing triplicate forms to able to run scripts with side effects.

Re:Show HN: CLI tool for saving web pages as a single file by popey on Monday August 26, 2019 @03:31PM (#20802905)
Amusing that you should mention Canonical "snaps". I made a snap of monolith and contributed the yaml upstream. https://snapcraft.io/monolith - it's in the edge channel because upstream haven't done a stable release yet. It's a strictly confined application.
Re:Show HN: CLI tool for saving web pages as a single file by Hackbraten on Friday August 23, 2019 @02:48PM (#20781107)
> Oh, wait, that’s exactly what Homebrew does, with the user’s full intent behind it!

Care to elaborate?

Re:Show HN: CLI tool for saving web pages as a single file by derefr on Friday August 23, 2019 @03:09PM (#20781389)
Homebrew is designed to take over your OS /usr/local directory. Not that there's much in there by default, but Homebrew's presence greatly changes the semantics of /usr/local, given that it's normally meant as a prefix for the local system administrator to install things as root into, whereas Homebrew re-assigns ownership of the whole directory structure to the user installing Homebrew (who, admittedly, is a member of the "staff" group, but still only one member on a potentially multiuser computer.)
Re:Show HN: CLI tool for saving web pages as a single file by skybrian on Friday August 23, 2019 @11:49AM (#20778822)
Even with decent containers, making software that's good enough for everyone to use is considerably more difficult than making it for yourself and a few friends.

It's okay to do things that don't scale at all, and also okay to make a proof of concept and let someone else worry about scaling it up.

That said, you might want to look at Chromebooks and the Windows and Mac app stores to see what's going on with containerization beyond mobile. (Also, web browsers.)

Re:Show HN: CLI tool for saving web pages as a single file by vaer-k on Friday August 23, 2019 @12:47PM (#20779468)
> I imagine something like "applications" folder where every subfolder automatically becomes an isolated "container". It would have to be designed with security as the primary concern, though; unlike current container solutions.

Isn't that basically just Qubes OS? https://www.qubes-os.org/

Re:Show HN: CLI tool for saving web pages as a single file by wongarsu on Friday August 23, 2019 @12:18PM (#20779106)
> I imagine something like "applications" folder where every subfolder automatically becomes an isolated "container"

Snap [1] goes pretty far in this direction. Apps are isolated against each other, and with AppArmor isolated from the system (at least on Ubuntu, your distro might vary). Android does much of the same.

A big problem is that most software exists to manipulate data on the user's machine, so isolating the software from the User folder is impractical. At the same time this data is usually the most valuable thing about the entire computer. That makes it fundamentally very hard to design a system where you can trust arbitrary apps. Android tried to solve this with a "file open" dialog that's controlled by the OS so that there's an easy way to give apps temporary access to single files, but that leads to weird UX.

1: https://snapcraft.io/

Re:Show HN: CLI tool for saving web pages as a single file by Rediscover on Sunday August 25, 2019 @03:03AM (#20791760)
> sanboxing arbitrary programs by default

See OLPC Bitfrost

http://wiki.laptop.org/go/Bitfrost

Re:Show HN: CLI tool for saving web pages as a single file by OJFord on Friday August 23, 2019 @05:20AM (#20775754)
Some people run ~everything in individual containers, with original commands being aliases for the docker (or whatever) equivalent.

I've shunned that assuming it'd be a big slow down, but I do keep meaning to at least try it, uh, after I knock it.

(No, containers like anything else aren't and haven't been completely secure all of the time since and forever, but it'd take a more sophisticated - and certainly deliberately malicious - tool to do any damage to your system, or to files you didn't explicitly allow it access to.)

Re:Show HN: CLI tool for saving web pages as a single file by roblabla on Friday August 23, 2019 @11:03AM (#20778348)
At least with containers, if something manages to do damage, it will have to do it through a security vulnerability - which will eventually get patched if caught. The current state of affairs is that malware can do damage without even needing to use a security vulnerability whatsoever. It's "working as designed", and will keep working forever.
Re:Show HN: CLI tool for saving web pages as a single file by forgotmypw on Friday August 23, 2019 @05:52AM (#20775896)
I do all of my development in a VM, which allows me to take snapshots and have a portable GNU workstation that's decoupled from my desktop and hardware.

Meanwhile, my desktop remains clean and ready to play media in native environment with good hardware support.

I used to think it'd be slow, until I tried it. My computer is 8+ years old, and it works fine. I mostly do text work.

Re:Show HN: CLI tool for saving web pages as a single file by OJFord on Friday August 23, 2019 @08:59AM (#20777027)
I used to use a VM (motivation being to run Linux on my locked-down corporate-imaged Macbook) and it was usable, but not as fast it could be if it had free reign over all CPU/RAM.

But, at least the way I was doing it, it's not adding any security as discussed here, since you're doing everything in the VM so anything in the VM has access to everything just as if everything on the host anyway.

Re:Show HN: CLI tool for saving web pages as a single file by forgotmypw on Friday August 23, 2019 @10:49AM (#20778197)
Scripts I run have access to my development environment for a free software project I already keep in a public repo.

What they don't have access to is my actual desktop, nor yesterday's snapshot of the VM desktop.

It's obviously not as fast as running GNU on bare metal, but it's fast enough for text work.

Re:Show HN: CLI tool for saving web pages as a single file by AnIdiotOnTheNet on Friday August 23, 2019 @11:27AM (#20778603)
> it's fast enough for text work.

I guess this is where we set the bar in 2019.

Re:Show HN: CLI tool for saving web pages as a single file by OJFord on Friday August 23, 2019 @05:19PM (#20782696)
Isn't the bar wherever you need it to be, on your own system, whatever the year?

I'm not GP commenter, but certainly what I do for a living is browse the the internet and edit text files.

Re:Show HN: CLI tool for saving web pages as a single file by forgotmypw on Friday August 23, 2019 @05:49PM (#20783012)
That's where my bar has been for 20+ years.
Re:Show HN: CLI tool for saving web pages as a single file by OJFord on Friday August 23, 2019 @03:42PM (#20781772)
Ah okay, that's why I thought to include 'at least for me' - because our 'all my development's were different! :)

For me, the VM was my entire machine. (It wasn't meant to improve security, it was purely because I wanted Linux but couldn't have it on the host.)

Re:Show HN: CLI tool for saving web pages as a single file by forgotmypw on Friday August 23, 2019 @05:48PM (#20783003)
That's a big part of the motivation for me.

I wanted GNU tools and environment, and I also wanted to not have to install Linux on the Apple hardware, because I don't have the patience for that.

Re:Show HN: CLI tool for saving web pages as a single file by flatroze on Friday August 23, 2019 @03:51AM (#20775361)
It's a valid question. It seems to me users tend to trust things which have certain level of popularity and reputation associated with them.

I personally prefer to hope for the worst. This way when nothing happens I feel extra lucky, and if bad things do happen, I feel proud of being ready for it.

Re:Show HN: CLI tool for saving web pages as a single file by air7 on Friday August 23, 2019 @12:22PM (#20779150)
I don't. In the age old debate between security and convince I sometimes want the latter and willing to ease on the former. To me being prepared for the worst is not fun. I use reputation of the software creator to manage my risks.
Re:Show HN: CLI tool for saving web pages as a single file by sieabahlpark on Friday August 23, 2019 @05:16AM (#20775739)
That could be said about nearly everything that you do.
Re:Show HN: CLI tool for saving web pages as a single file by chrisked on Friday August 23, 2019 @04:21AM (#20775497)
I just clicked on the OP user name first which has the caption Bad boy. Then I read your comment. Now I worry more about the security aspect than before.
Re:Show HN: CLI tool for saving web pages as a single file by ErrantX on Friday August 23, 2019 @04:31AM (#20775547)
Its funny how we sometimes think about risk; if the caption was 'good egg' would you be more trusting?
Re:Show HN: CLI tool for saving web pages as a single file by jolmg on Friday August 23, 2019 @11:41AM (#20778724)
People trust by default and only distrust when they spot a signal that believably correlates with maliciousness. Kind of like how people judge each other based on how they dress.
Re:Show HN: CLI tool for saving web pages as a single file by chrisked on Friday August 23, 2019 @04:39AM (#20775584)
I’d have a different initial response. Somehow it triggered my brain to think more about security and be on alert. I’m any case this faded away quickly. The mind is beautiful :)
Re:Show HN: CLI tool for saving web pages as a single file by progval on Friday August 23, 2019 @05:05AM (#20775699)
> Skimming the repo it has about a thousand lines of code and a bunch of dependencies with hundreds of sub-dependencies. Do you read all that code and evaluate the reputation of all dependencies?

I usually do a quick check to see if there's any red flag. Like URLs or Base64 blobs. I also try to stay away from programs written in languages whose environment I don't know so I can check if any dependency stands out wrt what the program claims to do.

> Do you execute it in a sandboxed environment?

Either I run it on an untrusted server, or on my laptop as an unpriviliged user (with no access to X/wayland).

Re:Show HN: CLI tool for saving web pages as a single file by sequoia on Friday August 23, 2019 @01:32PM (#20780124)
> Do you read all that code and evaluate the reputation of all dependencies?

Why of course. I do this for every piece of software on my computer, from the device drivers to the OS, I review every patch to firefox & chrome as well. /s

Running someone else's software inherently means extending them trust. This objection is especially confusing on a piece of software where you can actually inspect all the source if you like (unlike e.g. device drivers and OS code unless you run Gnu/Linux + all Free drivers, as few but RMS do).

Re:Show HN: CLI tool for saving web pages as a single file by Inhibit on Saturday August 24, 2019 @06:28PM (#20790109)
Your tongue in cheek points are good.

But on that last bit I disagree. Many, many systems run nothing but stock open source kernel drivers under Linux. I daresay home systems with closed drivers are more of an exception. All those VMs in the "cloud".

Re:Show HN: CLI tool for saving web pages as a single file by guy-brush on Friday August 23, 2019 @12:44PM (#20779421)
Related (the idea of having android-like permissions for desktop linux): https://github.com/open-source-ideas/open-source-ideas/issue...
Re:Show HN: CLI tool for saving web pages as a single file by jasonvorhe on Friday August 23, 2019 @04:17AM (#20775473)
What computer are you using and which operating system is running on that? Have you read the code?
Re:Show HN: CLI tool for saving web pages as a single file by mjlee on Friday August 23, 2019 @06:36AM (#20776139)
I think you might get a kick out of Ken Thompson's Reflections on Trusting Trust.

https://www.archive.ece.cmu.edu/~ganger/712.fall02/papers/p7...

Re:Show HN: CLI tool for saving web pages as a single file by gsich on Friday August 23, 2019 @05:54AM (#20775905)
Reading won't take you very far.
Re:Show HN: CLI tool for saving web pages as a single file by Avi-D-coder on Friday August 23, 2019 @02:20PM (#20780738)
Before I installed this tool, I checked if the author was a member of any well known organization and since they are not, I skimmed all the code for monolith and any of it's dependency that are not extremely popular, in this case mime-sniffer.
Re:Show HN: CLI tool for saving web pages as a single file by flatroze on Friday August 23, 2019 @06:51PM (#20783528)
That dependency is now gone, thank you for the review
Re:Show HN: CLI tool for saving web pages as a single file by iamvik on Friday August 23, 2019 @12:08PM (#20779010)
Largely agree, but it's hardly OP's fault. In my opinion this is one of the things we get by using 30 year old Operating System and there having been almost no innovation in that field for so long.
Re:Show HN: CLI tool for saving web pages as a single file by js4ever on Friday August 23, 2019 @03:58AM (#20775398)
It takes 2 commandes to create a new LXC container and ssh into it, then I install the software inside the container
Re:Show HN: CLI tool for saving web pages as a single file by masklinn on Friday August 23, 2019 @04:18AM (#20775476)
That's more secure than running straight on the machine but not completely secure, security was never a core goal of linux containers.

You want to run the software properly sandboxed, since linux doesn't have really engineered OS-level solutions (à la Solaris) that means vm e.g. running in qemu, or biting the bullet and switching to qubes.

Re:Show HN: CLI tool for saving web pages as a single file by Huggernaut on Friday August 23, 2019 @04:26AM (#20775520)
I think that's an extremely uncharitable view on containers. There has been a massive amount of work put into securing containers for a variety of use cases using both layers available and by adding to the kernel.
Re:Show HN: CLI tool for saving web pages as a single file by masklinn on Friday August 23, 2019 @05:41AM (#20775851)
> I think that's an extremely uncharitable view on containers.

It's an objective one.

> There has been a massive amount of work put into securing containers for a variety of use cases using both layers available and by adding to the kernel.

That doesn't change the fact that security was never the primary goal for containers, so secure containers were and are a bunch of tricks, kludges and prayers being built up in the hope that eventually all the holes in the model will be patched.

The "Making containers safer"[lwn][hn] talk was literally two days ago. Note how it says safer, not safe.

[lwn] https://lwn.net/SubscriberLink/796700/9bc9daa32a8fe499/

[hn] https://news.ycombinator.com/item?id=20764355

Re:Show HN: CLI tool for saving web pages as a single file by pbhjpbhj on Friday August 23, 2019 @07:07AM (#20776278)
Of course it says safer, if someone tells you something is entirely safe you know they're lying.
Re:Show HN: CLI tool for saving web pages as a single file by Huggernaut on Tuesday August 27, 2019 @03:55PM (#20813811)
It is not objective by any stretch of the imagination.

I suppose when security enhancements are made to any other system to make them safer (i.e. everything in the realm of security), you apply the same logic? Subjective.

Re:Show HN: CLI tool for saving web pages as a single file by roblabla on Friday August 23, 2019 @11:07AM (#20778384)
Can you please quote how containers are not built with security in mind? What would even be the point of user namespacing, network namespaces, filesystem namespaces, etc... if not security?
Re:Show HN: CLI tool for saving web pages as a single file by MaxBarraclough on Friday August 23, 2019 @05:08PM (#20782593)
Look at how the cloud providers offer support for containers.

Do they ever offer to run your container in the same VM as those of other customers?

They never do this. For secure isolation, they only trust VM isolation. It seems unlikely that this will change.

> What would even be the point of user namespacing, network namespaces, filesystem namespaces, etc... if not security?

They're for installation/configuration/administration. They allow you to run multiple applications on one Linux VM, and to configure them independently, almost as if you were running multiple VMs (with the advantage of lower overheads - only one instance of the kernel).

Kubernetes puts this to good use, letting you treat application deployments as commodities across your cluster.

Containers do not offer secure isolation. They are by nature much leakier than the isolation VMs can offer. The Docker folks still treat isolation-failures as bugs, of course. (Well, ignoring things like the way 'uptime' gives the uptime of the underlying machine, and not of your container.)

Re:Show HN: CLI tool for saving web pages as a single file by Huggernaut on Tuesday August 27, 2019 @03:57PM (#20813828)
There are many services that run applications colocated on VMs in containers.

I don't disagree they are leakier abstractions but they can still satisfy a wide variety of workload security needs.

Re:Show HN: CLI tool for saving web pages as a single file by yters on Friday August 23, 2019 @11:59AM (#20778912)
I recently took a course on how cgroups and namespaces work, and can be combined to create containers, and my impression is security is a huge kludge. For example, the capabilities are just a seeming random assortment of different permissions, with a big dumping ground in the admin capability. It's hard to see how such a system can be reliably secured. Plus, it's all open source with a couple core contributors. What's to stop some state agency inserting its code into the core? No way to review everything, and a suitably clever developer can place a backdoor somewhere in all of the millions of lines of code. So, I must agree that security is not really at the forefront of Linux or container technology.
Re:Show HN: CLI tool for saving web pages as a single file by MaxBarraclough on Friday August 23, 2019 @05:23PM (#20782740)
> my impression is security is a huge kludge

Docker itself could be called a huge kluge, at least compared to Solaris 'zones' and FreeBSD 'jails'.

They're similar to containers, but are supported directly by the kernel, whereas Docker has to pull together different kernel features to create its abstraction. [0]

> What's to stop some state agency inserting its code into the core? No way to review everything

1. This isn't a point about containers, it's a point about Free and Open Source software in general. Do you avoid all Open Source software when security matters? 2. I'm pretty sure the Linux kernel folks review everything, and I imagine the Docker folks do too 3. You're implicitly assuming that closed-source software is safe from government pressure. It is not.

[0] https://blog.jessfraz.com/post/containers-zones-jails-vms/

Re:Show HN: CLI tool for saving web pages as a single file by yters on Saturday August 24, 2019 @01:12PM (#20788346)
Nothing is safe from government pressure. But, at least with local closed source we know it's going to just be our government pressure. Otherwise, it could be any actor, which may be less friendly towards us.
Re:Show HN: CLI tool for saving web pages as a single file by MaxBarraclough on Sunday August 25, 2019 @08:58AM (#20792709)
> with local closed source we know it's going to just be our government pressure

We don't. Companies that produce proprietary code are not immune from attacks on their repository, and are more vulnerable to, say, bribery. They're also more vulnerable to attacks on their distributed binaries - users do not have the option to compile from source, so you compromise every user this way.

Proprietary software is also far more likely to embed 'telemetry' spying, or to use sloppy security practices and rely on security-by-obscurity. Authors of Free and Open Source software know that they (generally at least [0]) cannot get away with this kind of thing.

It simply isn't true that proprietary software is more trustworthy than FOSS. If anything, the opposite appears to be true.

[0] https://news.ycombinator.com/item?id=14754740

Re:Show HN: CLI tool for saving web pages as a single file by yters on Monday August 26, 2019 @10:02AM (#20799913)
[citation requested]
Re:Show HN: CLI tool for saving web pages as a single file by mixmastamyk on Friday August 23, 2019 @05:02AM (#20775684)
I often run new things in a vm with snapshots. When I don’t it’s as a limited user.
Re:Show HN: CLI tool for saving web pages as a single file by interfixus on Friday August 23, 2019 @03:51AM (#20775359)
We may semi-trust our package and repo systems. This tool is readily available through AUR on my Arch machine, I see. Or we may go the whole hog and actually have a peek through the source.
Re:Show HN: CLI tool for saving web pages as a single file by laumars on Friday August 23, 2019 @04:02AM (#20775405)
AUR are packages that aren't in Arch's repo system. Granted tools like yaourt do make installing AUR packages nearly as easy as pacman but anyone can upload anything to AUR thus you are expected to vet the packages yourself (hence why tools like yaourt repeatedly prompt you to read the build scripts et al before running them).
Re:Show HN: CLI tool for saving web pages as a single file by interfixus on Friday August 23, 2019 @05:51AM (#20775887)
> AUR are packages that aren't in Arch's repo system

AUR, Arch User Repository.

> thus you are expected to vet the packages yourself

Obviously, as a long time Arch user I didn't know this.

Re:Show HN: CLI tool for saving web pages as a single file by psychrometer on Friday August 23, 2019 @10:43AM (#20778132)
You emphasized the wrong word.

It is the Arch User Repository.

> DISCLAIMER: AUR packages are user produced content. Any use of the provided files is at your own risk.[0]

[0] https://aur.archlinux.org