Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add listenaddress option #187

Merged
merged 1 commit into from
Feb 9, 2021
Merged

Conversation

alsm
Copy link
Contributor

@alsm alsm commented Feb 9, 2021

I've added an explicit listenaddress option in addition to listenport.
In my particular use case I'm running falcosidekick in a net=host
container and don't want it to bind to external IPs.
Also fixed a gosec complaint about json.Unmarshal in webui.go

Signed-off-by: Al Stockdill-Mander asm@uk.ibm.com

/kind cleanup
/kind feature

/area config

Special notes for your reviewer:

I've removed the "\n" from log lines around the areas I have changed as they are not required, from https://golang.org/pkg/log/ "Every log message is output on a separate line: if the message being printed does not end in a newline, the logger will add one."

Also when resolving the gosec issue with json.Unmarshal in webui.go I changed the fmt.Sprintf to .String() on the Get() as https://golang.org/pkg/expvar/#Var specifies that

type Var interface {
// String returns a valid JSON value for the variable.
// Types with String methods that do not return valid JSON
// (such as time.Time) must not be used as a Var.
String() string
}

I've added an explicit listenaddress option in addition to listenport.
In my particular use case I'm running falcosidekick in a net=host
container and don't want it to bound to external IPs.
Also fixed a gosec complaint about json.Unmarshal

Signed-off-by: Al Stockdill-Mander <asm@uk.ibm.com>
@poiana poiana added the lgtm label Feb 9, 2021
@poiana
Copy link

poiana commented Feb 9, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link

poiana commented Feb 9, 2021

LGTM label has been added.

Git tree hash: 1088d39f80d44bffaacc7bfbcfc365ddd555ec02

@poiana poiana added the approved label Feb 9, 2021
@Issif
Copy link
Member

Issif commented Feb 9, 2021

🙏

@poiana poiana merged commit 5e6d6b5 into falcosecurity:master Feb 9, 2021
@alsm alsm deleted the listen_address branch February 9, 2021 17:04
@Issif Issif added this to the 2.21.0 milestone Feb 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants