Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
IverCoder ( IverCoder@lemm.ee )  to Linux@lemmy.mlEnglish · 3 years ago

If only more Linux programs followed sandboxing best practices...

i.imgur.com

external-link
message-square
41
link
fedilink
353
external-link

If only more Linux programs followed sandboxing best practices...

i.imgur.com

IverCoder ( IverCoder@lemm.ee )  to Linux@lemmy.mlEnglish · 3 years ago
message-square
41
link
fedilink
alert-triangle
You must log in or # to comment.
  • Strit ( Strit@lemmy.linuxuserspace.show ) 
    link
    fedilink
    arrow-up
    109
    ·
    3 years ago

    What if your app actually needs access to the internet?

    • tony ( tony@lemmy.hoyle.me.uk ) 
      link
      fedilink
      arrow-up
      129
      ·
      3 years ago

      Or actually do anything useful? No network, no filesystem… it’s a hello world app isn’t it…

      • snowfalldreamland ( snowfalldreamland@lemmy.ml ) 
        link
        fedilink
        arrow-up
        27
        ·
        3 years ago

        There are portals: https://docs.flatpak.org/en/latest/desktop-integration.html#portals . they allow secure access to many features. Also any flatpak app still has access to a private app-specific filesystem, just not to the host.

        Doesn’t work for all applications but for many sand boxing is possible without a loss of features.

      • Pantherina ( Pantherina@feddit.de ) 
        link
        fedilink
        arrow-up
        17
        ·
        3 years ago

        Portal.

      • IverCoder ( IverCoder@lemm.ee ) OP
        link
        fedilink
        English
        arrow-up
        14
        ·
        3 years ago

        There’s Obfuscate, an image redactor, and Metadata Cleaner which is self-descriptive. Both works properly without any filesystem access at all, because they use the file picker portal to ask the user for the files to be processed.

    • Empricorn ( Empricorn@feddit.nl ) 
      link
      fedilink
      English
      arrow-up
      28
      ·
      3 years ago

      Oh come on, what modern program actually needs to communicate or access the file system?

    • QuazarOmega ( QuazarOmega@lemy.lol ) 
      link
      fedilink
      arrow-up
      15
      ·
      3 years ago

      Download the internet along with it!

      • ivanafterall ( ivanafterall@kbin.social ) 
        link
        fedilink
        arrow-up
        25
        ·
        3 years ago

        I’m self-hosting the entire internet. I hope you guys are enjoying yourselves.

        • Norah (pup/it/she) ( princessnorah@lemmy.blahaj.zone ) 
          link
          fedilink
          English
          arrow-up
          15
          ·
          3 years ago

          https://github.com/iiab/iiab

          • ivanafterall ( ivanafterall@kbin.social ) 
            link
            fedilink
            arrow-up
            6
            ·
            3 years ago

            That’s super cool. I bookmarked it. Thanks!

          • Pantherina ( Pantherina@feddit.de ) 
            link
            fedilink
            arrow-up
            3
            ·
            3 years ago

            Lol

        • QuazarOmega ( QuazarOmega@lemy.lol ) 
          link
          fedilink
          arrow-up
          4
          ·
          3 years ago

          Thanks for having us on your server… when can I get out again though?

          • ivanafterall ( ivanafterall@kbin.social ) 
            link
            fedilink
            arrow-up
            6
            ·
            3 years ago

            I just unplugged you. Give it a minute or two and no more pain.

            • QuazarOmega ( QuazarOmega@lemy.lol ) 
              link
              fedilink
              arrow-up
              2
              ·
              3 years ago

              Thank you, good… bye

            • Cwilliams ( Cwilliams@beehaw.org ) 
              link
              fedilink
              arrow-up
              1
              ·
              3 years ago

              Jane

      • 1984 ( 1984@lemmy.today ) 
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        I remember in 1995-ish or something when I used the internet for the first time using the Netscape browser… And I was asking a friend if he had tried all the web sites yet. Just got a weird look back… :) I didn’t know what the internet was back then at first.

    • IverCoder ( IverCoder@lemm.ee ) OP
      link
      fedilink
      English
      arrow-up
      15
      ·
      3 years ago

      The app can then declare the network permission and it will still be marked as safe.

    • aida ( aida@lemm.ee ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      deleted by creator

  • darth_tiktaalik ( darth_tiktaalik@lemmy.ml ) 
    link
    fedilink
    arrow-up
    95
    ·
    3 years ago

    I like how the app name is blacked out so as not to dox the flathub app.

    • Radioactive Radio ( radioactiveradio@lemm.ee ) 
      link
      fedilink
      arrow-up
      28
      ·
      3 years ago

      Sanboxed from prying eyes, it’s completely safe.

  • Blackmist ( Blackmist@feddit.uk ) 
    link
    fedilink
    English
    arrow-up
    27
    ·
    3 years ago

    Likes like Hello World is ready to ship.

    • IverCoder ( IverCoder@lemm.ee ) OP
      link
      fedilink
      English
      arrow-up
      18
      ·
      3 years ago

      With a bit of modifying code to use the color picker and maybe rearranging the workflow to adapt to the new system, apps as advanced as DaVinci Resolve and LibreOffice can have permissions as restrictive as this (the network permission would of course may be needed but it would still be marked as Safe by Flathub).

      You can use the file picker API to open the files or folders your app would need to access while having no filesystem permissions at all. You can access the camera, microphone, and GPS without the user devices portal, by simply using the respective portals where the user has the power to allow or deny access to such devices as they wish.

      You can record the screen, take a screenshot, and pick a color in the screen by simply calling the proper portals, with the bonus that the user will be able to select if they want the entire screen, a specific window, or a specific area to be recorded/captured and whether the cursor should be shown or not.

      Heck, even TeamViewer can be as this restricted without losing any functionality if they use the Screen Cast portal which allows apps to mirror input from a remote device! They would of course need the network permission, but that’s still safe.

      • areyouevenreal ( areyouevenreal@lemm.ee ) 
        link
        fedilink
        arrow-up
        3
        ·
        3 years ago

        Does all of this require flatpack specific APIs?

        • Markaos ( Markaos@lemmy.one ) 
          link
          fedilink
          arrow-up
          6
          ·
          3 years ago

          Yes in the sense that the APIs were made because of flatpak, but not in the sense that devs would need to keep two separate code paths for flatpak vs non-flatpak - portals work everywhere.

          • areyouevenreal ( areyouevenreal@lemm.ee ) 
            link
            fedilink
            arrow-up
            2
            ·
            3 years ago

            Does it work with snapcraft?

            • Markaos ( Markaos@lemmy.one ) 
              link
              fedilink
              arrow-up
              1
              ·
              3 years ago

              Yep

              • areyouevenreal ( areyouevenreal@lemm.ee ) 
                link
                fedilink
                arrow-up
                1
                ·
                3 years ago

                There is no need to downvote someone over a question.

                • Markaos ( Markaos@lemmy.one ) 
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  3 years ago

                  I haven’t done that, lemmy.one doesn’t even have downvotes

  • 𝒍𝒆𝒎𝒂𝒏𝒏 ( lemann@lemmy.one ) 
    link
    fedilink
    arrow-up
    26
    ·
    3 years ago

    This kind of thing could work for a few apps, say a color picker utility or a QR code generator etc.

    Looking at the docs, it isn’t clear if apps can write to their own namespace (instead of writing to user folders directly), but if they can, we could expand the scope to games like supertuxkart, 2048 etc, which would then be able to save user milestones and progress in their own area - a bit like how Android apps do it

    https://docs.flatpak.org/en/latest/sandbox-permissions.html

    It’s a great start IMO, although admittedly there is still work to do. Flatpak atm bridges the gap with allowing new apps, requiring new libs, to run on older stable/LTS distros

  • soulfirethewolf ( soulfirethewolf@lemdro.id ) 
    link
    fedilink
    English
    arrow-up
    18
    ·
    3 years ago

    It’s nice to see good app security being praised. Sometimes it feels like some people on lemmy (and the fediverse) throw security to the wind.

    Like one time I had heard someone over on Mastodon say that they thought that HTTPS was too overused and shouldn’t have been everywhere because it makes older apps unable to access sites and also made adblocking just ever so slightly harder.

    Which yeah, I love adblockers, but I’m definitely not comfortable with all traffic having to go unencrypted just for it.

    • JustARegularNerd ( JustARegularNerd@aussie.zone ) 
      link
      fedilink
      English
      arrow-up
      4
      ·
      3 years ago

      But my 1998 Windows CE device that’s made obsolete by those meddling modern security practices!

  • bizdelnick ( bizdelnick@lemmy.ml ) 
    link
    fedilink
    arrow-up
    13
    ·
    3 years ago

    What is this? A solitaire game?

    • IverCoder ( IverCoder@lemm.ee ) OP
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      3 years ago

      This could well be an advanced video editor or an office suite if they take full advantage of the portals API without losing any functionality. Well, they can have the network permission, it would still be safe anyway.

  • MonkderZweite ( MonkderZweite@feddit.ch ) 
    link
    fedilink
    arrow-up
    5
    ·
    3 years ago

    Does it have to be sandboxed?

    • IverCoder ( IverCoder@lemm.ee ) OP
      link
      fedilink
      English
      arrow-up
      9
      ·
      3 years ago

      An app should not be able to access stuff the user did not consent to letting access.

      • MonkderZweite ( MonkderZweite@feddit.ch ) 
        link
        fedilink
        arrow-up
        8
        ·
        edit-2
        3 years ago

        deleted by creator

        • lukas ( lukas@lemmy.haigner.me ) 
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          3 years ago

          deleted by creator

        • IverCoder ( IverCoder@lemm.ee ) OP
          link
          fedilink
          English
          arrow-up
          3
          ·
          3 years ago

          Well, no matter how I trust my photo editing app, it has no business accessing my thesis documents. Proper filesystem sandboxing does security properly.

      • stella ( stella@lemm.ee ) 
        cake
        link
        fedilink
        arrow-up
        2
        ·
        3 years ago

        Isn’t that what file system permissions are for?

        • IverCoder ( IverCoder@lemm.ee ) OP
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 years ago

          The file picker API is there to allow apps to access and save files with the user’s consent, while bot having any filesystem access. So a properly sandboxed app would be able to open, edit, and save files wherever the user wants, while not having access to any other irrelevant files, such as your .bashrc or memes folder.

  • corsicanguppy ( corsicanguppy@lemmy.ca ) 
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    Still not worth dependency hell.

    • OsrsNeedsF2P ( OsrsNeedsF2P@lemmy.ml ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      Relevance?

  • ΛdΛm_𝒷 ( adam_b@infosec.pub ) Banned
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    2 years ago

    Removed by mod

  • Possibly linux ( possiblylinux127@lemmy.zip ) 
    link
    fedilink
    English
    arrow-up
    2
    ·
    3 years ago

    Cool

Linux@lemmy.ml

linux@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linux@lemmy.ml

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

  • !opensource@lemmy.ml
  • !libre_culture@lemmy.ml
  • !technology@lemmy.ml
  • !libre_hardware@lemmy.ml

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

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 1.59K users / month
  • 5.83K users / 6 months
  • 1.31K local subscribers
  • 68.1K subscribers
  • 8.11K Posts
  • 109K Comments
  • Modlog
  • mods:
  • AgreeableLandscape ( AgreeableLandscape@lemmy.ml ) 
  • nooter692 ( nooter692@lemmy.ml ) 
  • MarcellusDrum ( MarcellusDrum@lemmy.ml ) 
  • Arthur Besse ( cypherpunks@lemmy.ml ) 
  • Cyclohexane ( cyclohexane@lemmy.ml ) 
  • d3Xt3r ( d3Xt3r@lemmy.nz ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code