goss icon indicating copy to clipboard operation
goss copied to clipboard

Either drop file/size from add/autoadd OR add md5 and sha to it.

Open aelsabbahy opened this issue 7 years ago • 8 comments

Need to make a decision on which one of these attributes are included in add and which are not:

  • Size
  • md5
  • sha256

aelsabbahy avatar Jul 10 '17 14:07 aelsabbahy

SHA-256 may be the most sensible and current attribute to default to? Especially with the recent (last year or so) posts about SHA-1 / MD5 collisions.

pysysops avatar Aug 06 '17 22:08 pysysops

If one of them were to stay sha256 makes the most sense.

I'm just not sure if sha256 by default is a useful addition or an annoyance (generated test too rigid).

I can go either way on this one. Drop them all, add them all, or only keep sha256.

aelsabbahy avatar Aug 06 '17 22:08 aelsabbahy

When deciding on defaults, it's often best to go the "simpler" route.

IMO, it's best to use none of those checks and to let the user decide what he/she wants to add.

Perhaps this opens the door on supporting additional flags to goss add for the file test, e.g. --checksum. Thoughts?

elliotweiser avatar Aug 06 '17 23:08 elliotweiser

So the opposite exists today in Goss with --exclude-attr. There could be an --include-xtra-attr global flag that does this.

That said, to your point about "simpler." It really comes down to what would the majority of users expect from a goss add file. My gut tells me @pysysops is right with just sha256, but no size.

aelsabbahy avatar Aug 06 '17 23:08 aelsabbahy

I think it comes down to whether or not a file is expected to change very often. While I enjoy a special love for the sha256 test, I cannot claim one way or the other that static files are the target of the majority use case.

elliotweiser avatar Aug 06 '17 23:08 elliotweiser

Yeah, that's what bother me about size. It's such a flakey test, but with even less value than sha256.

Maybe less is more. Keep all the "extra" tests as manual.

aelsabbahy avatar Aug 07 '17 12:08 aelsabbahy

FWIW, I wouldn't be opposed to switching out size with sha256 to see what kind of feedback it generates.

elliotweiser avatar Aug 07 '17 14:08 elliotweiser

Deciding to drop size

aelsabbahy avatar Dec 14 '19 07:12 aelsabbahy