Skip to content

common/custom tools clone stanzas - should not rm -rf arbitrarily, should instead set 700 on root folder #8

Description

@arubdesu

-p'ing the mkdir means it sets 0777 on all intermediate folders, which may be all well and good in single-user systems with good security hardening practices already in place, but it should be addressed by instead creating the ~/src directory first with 700 if not present, with a chmod +a everyone deny delete" ~/src for good measure.
If you'd like I can whip up a branch/PR for this as well, but it's also weird when the boot script creates the folders(which it seems assumes the short username == github name? I don't understand the CS_REMOTE=${1:-github.com/osxc/xc-custom}) it essentially runs a 'clean' on both the common and custom folders by rm -rf'ing after creation. We know mkdir -p will not error if it sees directories are already there, so this would be uncaught with the current code and could cause data loss. If you want to add an optional 'clean' function and variable that's off by default but around for troubleshooting, it may make more sense.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions