Skip to content

Commit

Permalink
merge #27 into cyphar/filepath-securejoin:main
Browse files Browse the repository at this point in the history
Kir Kolyshkin (3):
  gha: add codespell job
  gha: rm obsoleted exclude
  Fix a few typos

LGTMs: cyphar
  • Loading branch information
cyphar committed Sep 25, 2024
2 parents 7936c71 + 1658c28 commit acff035
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ jobs:
- "1.21"
- "1.22"
- "^1"
exclude:
# It seems MacOS 1.14 is no longer cached by actions/setup-go.
- os: macos-latest
go-version: "1.14"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -123,3 +119,10 @@ jobs:
with:
name: fullcoverage-${{ github.job }}.html
path: ${{ env.FULLCOVERAGE_FILE }}.html

codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pip install codespell==v2.3.0
- run: codespell
2 changes: 1 addition & 1 deletion mkdir_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func MkdirAllHandle(root *os.File, unsafePath string, mode int) (_ *os.File, Err
}

// NOTE: mkdir(2) will not follow trailing symlinks, so we can safely
// create the finaly component without worrying about symlink-exchange
// create the final component without worrying about symlink-exchange
// attacks.
if err := unix.Mkdirat(int(currentDir.Fd()), part, uint32(mode)); err != nil {
err = &os.PathError{Op: "mkdirat", Path: currentDir.Name() + "/" + part, Err: err}
Expand Down
2 changes: 1 addition & 1 deletion mkdir_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var mkdirAll_MkdirAllHandle mkdirAllFunc = func(t *testing.T, root, unsafePath s
}
defer handle.Close()

// We can use SecureJoin here becuase we aren't being attacked in this
// We can use SecureJoin here because we aren't being attacked in this
// particular test. Obviously this check is bogus for actual programs.
expectedPath, err := SecureJoin(root, unsafePath)
require.NoError(t, err)
Expand Down
2 changes: 1 addition & 1 deletion procfs_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func procThreadSelf(procRoot *os.File, subpath string) (_ *os.File, _ procThread
// absolutely sure we are operating on a clean /proc handle that
// doesn't have any cheeky overmounts that could trick us (including
// symlink mounts on top of /proc/thread-self). RESOLVE_BENEATH isn't
// stricly needed, but just use it since we have it.
// strictly needed, but just use it since we have it.
//
// NOTE: /proc/self is technically a magic-link (the contents of the
// symlink are generated dynamically), but it doesn't use
Expand Down

0 comments on commit acff035

Please sign in to comment.