go-audit icon indicating copy to clipboard operation
go-audit copied to clipboard

Migrate to using golang.org/x/sys/unix over syscall

Open bored-engineer opened this issue 4 years ago • 6 comments

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've been mindful about doing atomic commits, adding documentation to my changes, not refactoring too much.
  • [x] I've a descriptive title and added any useful information for the reviewer. Where appropriate, I've attached a screenshot and/or screencast (gif preferrably).
  • [x] I've written tests to cover the new code and functionality included in this PR.
  • [x] I've read, agree to, and signed the Contributor License Agreement (CLA).

PR Summary

The "syscall" package used by go-audit has been frozen since Go 1.4:

Deprecated: this package is locked down. Callers should use the corresponding package in the golang.org/x/sys repository instead. That is also where updates required by new systems or versions should be applied. See https://golang.org/s/go1.4-syscall for more information.

This PR migrates to using golang.org/x/sys/unix instead as new fixes/features are implemented there.

Related Issues

Closes #73

Test strategy

go build succeeds without errors go test passes

bored-engineer avatar Apr 18 '20 19:04 bored-engineer

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Apr 18 '20 19:04 CLAassistant

Sorry for the force pushes, had to fix the emails in the commit to match the CLA email I used

bored-engineer avatar Apr 18 '20 19:04 bored-engineer

Codecov Report

Merging #74 into master will not change coverage. The diff coverage is 84.21%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #74   +/-   ##
=======================================
  Coverage   64.09%   64.09%           
=======================================
  Files           7        7           
  Lines         596      596           
=======================================
  Hits          382      382           
  Misses        193      193           
  Partials       21       21           
Impacted Files Coverage Δ
client.go 89.23% <80.00%> (ø)
audit.go 74.58% <100.00%> (ø)
marshaller.go 52.43% <100.00%> (ø)
parser.go 89.61% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 75218d0...204af48. Read the comment docs.

codecov-io avatar Apr 26 '20 22:04 codecov-io

@wadey is there the possibility that this pull request can be merged?

iFrozenPhoenix avatar Oct 26 '21 12:10 iFrozenPhoenix

I'm unclear as to what problem this is solving. While it is true that syscall is a frozen API, it has the necessary netlink APIs to get kernel audit data. The syscall package still gets bug fixes, it is just not getting new API additions.

psanford avatar Oct 26 '21 12:10 psanford

Thank you for the clarification why it is not merged.

iFrozenPhoenix avatar Oct 26 '21 12:10 iFrozenPhoenix