• soulfirethewolf@lemdro.id
    link
    fedilink
    English
    arrow-up
    16
    arrow-down
    1
    ·
    1 year 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.

    • IverCoder@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      edit-2
      1 year 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.

    • IverCoder@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      10
      ·
      edit-2
      1 year ago

      As well as FOSS too. Sandboxing is a security standard that should be followed by every software how open their code may be.

    • IverCoder@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      1 year ago

      It’s actually Dippi but I don’t want to look like I’m advertising it here

  • Spectacle8011@lemmy.comfysnug.space
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    What really needs to happen:

    Flatpak packages should ask for every permission they need, and the user needs to approve every one of them.

    Right now, we have this weird in-between state where some flatpak packages ship with limited permissions (like Bottles). That’s because every permission the package asks for is immediately granted. The user doesn’t get a chance to refuse these requests. This current model serves to make life more difficult for non-malicious flatpak packagers while failing to protect users from malicious packages.

    Also, GNOME needs a Flatpak permissions center like KDE. You shouldn’t need to install a third party program to manage permissions.

    • miss_brainfart@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Absolutely, permissions should be disabled by default, and only when the app needs to do something that requires a certain permission should it ask for it.

      Maybe even do something like Android, where permissions automatically get revoked if you don’t use an app for a certain time. I love that feature.

      • oldfart@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        edit-2
        1 year ago

        It’s the first time I hear someone praise Android messing with user’s settings. Care to elaborate why you like it?

        • miss_brainfart@lemmy.ml
          link
          fedilink
          arrow-up
          4
          ·
          1 year ago

          There is very little reason any app should keep its permissions if you never actually use it, is there?

          Especially when most people use apps that phone home every last piece of data they give them access to.

          • oldfart@lemm.ee
            link
            fedilink
            arrow-up
            3
            ·
            1 year ago

            I don’t agree but I see your point, that would certainly be useful to some people. Thank you for explaining.

            • miss_brainfart@lemmy.ml
              link
              fedilink
              arrow-up
              1
              ·
              1 year ago

              I think it’s enabled by default, but you can also just disable it for specific apps.

              But if you leave it enabled and permissions get revoked after a while, you’ll get a notification telling you about it. I think that’s fair.

              There’s always going to be a debate on whether something like this should be opt-in or opt-out, but for the purpose of privacy and data security, it makes sense to be on by default, I reckon.

    • JoYo@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      it’s weird that android and ios already provide this but THE container standard doesn’t

    • IverCoder@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      1 year 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.

    • IverCoder@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      1 year ago

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

        • IverCoder@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          edit-2
          1 year 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.

  • 𝒍𝒆𝒎𝒂𝒏𝒏@lemmy.one
    link
    fedilink
    arrow-up
    0
    ·
    1 year 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

    • themoonisacheese@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Yes, they can. There are app-specific folders in .local that flatpaks can read and write to specifically for this purpose, and also the file picking dialog may give access to the one specific file you picked.

      Android IMO has great usability in exposing a database to apps, which means they aren’t required to ship their own database engine.