Open incertum opened 10 months ago
@Andreagit97 @incertum I am interested in this issue! Can I work on this?
Not clear to me what was the plan @incertum had in mind when she opened this issue, so I'll let her answer here. My 2 cents, this issue seems related to possible breaking changes in the Falco UX, maybe something that we want to tackle for Falco 1.0.0, not sure this is a "good first issue" but let's see what others think about that
Goal is to correct the -pc
, -pk
or -pcontainer
, -pkubernetes
flags that do not conform to standard CLI practices. Usually -pc
implies a combination of -p
and -c
.
https://falco.org/docs/outputs/formatting/ https://github.com/falcosecurity/falco/blob/99781f79364264411fc4e95d8dcd1edf2629ddff/userspace/falco/app/options.cpp#L187
I would propose them being:
-pc
-> --print-container
and --print-container-gvisor
or similar-pk
-> --print-kubernetes
and --print-kubernetes-gvisor
or similarSuggesting to sync with @leogr.
Usually
-pc
implies a combination of-p
and-c
.
This is the main issue, likely.
If we follow POSIX's recommendation:
Multiple options may follow a hyphen delimiter in a single token if the options do not take arguments. Thus, ‘-abc’ is equivalent to ‘-a -b -c’.
So, -pc
is not ok.
But:
An option and its argument may or may not appear as separate tokens. (In other words, the whitespace separating them is optional.) Thus, -o foo and -ofoo are equivalent.
So -pcontainer
is equivalent to -p container
and it would be ok (and it is what's happening here).
My recommendation is to reaudit all flags, and try to make them consistent with POSIX. The cobra project may be a source of inspiration. Also, if we follow Cobra/posix recommendations, we will have consistency across all our other tools (which are implemented in Go).
Let's dig deeper into this once we have found some time.
Agreed @leogr let's investigate more. It's something valuable for Falco 1.x.
/milestone 1.0.0
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
/remove-lifecycle stale
/assign @LucaGuerra
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale
Proposing to follow common and standard Program Argument Syntax Conventions for Falco's CLI options, for example see this resource. For example -pk and similar options seem to fall outside of these conventions.