diff --git a/.github/workflows/sbom_generator.yml b/.github/workflows/sbom_generator.yml index c9a08a6..f6af6c4 100644 --- a/.github/workflows/sbom_generator.yml +++ b/.github/workflows/sbom_generator.yml @@ -19,7 +19,7 @@ jobs: id: sbom env: GITHUB_TOKEN: ${{ github.token }} - - uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 + - uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: path: ${{steps.sbom.outputs.fileName }} name: "SBOM" diff --git a/disk/disk_windows.go b/disk/disk_windows.go index 9fefb14..4f371a3 100644 --- a/disk/disk_windows.go +++ b/disk/disk_windows.go @@ -133,7 +133,7 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro uintptr(unsafe.Pointer(&lpFileSystemNameBuffer[0])), uintptr(len(lpFileSystemNameBuffer))) if driveret == 0 { - if typeret == 5 || typeret == 2 { + if typeret == 2 || typeret == 4 || typeret == 5 { continue // device is not ready will happen if there is no disk in the drive } warnings.Add(err) diff --git a/process/process_freebsd.go b/process/process_freebsd.go index d87c43e..436dcf0 100644 --- a/process/process_freebsd.go +++ b/process/process_freebsd.go @@ -6,6 +6,7 @@ package process import ( "bytes" "context" + "errors" "path/filepath" "strconv" "strings" @@ -329,7 +330,7 @@ func (p *Process) getKProc() (*KinfoProc, error) { return nil, err } if length != sizeOfKinfoProc { - return nil, err + return nil, errors.New("unexpected size of KinfoProc") } k, err := parseKinfoProc(buf) diff --git a/process/process_openbsd.go b/process/process_openbsd.go index 76ae3e3..e2d0ab4 100644 --- a/process/process_openbsd.go +++ b/process/process_openbsd.go @@ -7,6 +7,7 @@ import ( "bytes" "context" "encoding/binary" + "errors" "fmt" "io" "path/filepath" @@ -343,7 +344,7 @@ func (p *Process) getKProc() (*KinfoProc, error) { return nil, err } if length != sizeOfKinfoProc { - return nil, err + return nil, errors.New("unexpected size of KinfoProc") } k, err := parseKinfoProc(buf)