Git Product home page Git Product logo

Comments (3)

powersj avatar powersj commented on June 3, 2024

Hi,

Some of the hardening options require the use of cgo. Telegraf builds are static binaries and do not use cgo today. This is not something we would change.

Any changes would be done in a new minor release and not a bug fix release as well.

@jdstrand pointed out that PIE has potential for performance impact depending on arch (see https://wiki.ubuntu.com/Security/Features#Built_as_PIE). We would probably want this enable only in amd64, arm64, s390x, riscv64, ppc64el builds. Additionally, we would want to do some testing of sorts to ensure we do not greatly regress performance, particularly in the parsers.

The other changes would generally require the use of CGO to pass flags to the C compiler.

As a result, I think the change required then is to add GOFLAGS="-buildmode=pie" to the specific architectures listed above. That would enable PIE and RELRO would report as partial.

from telegraf.

powersj avatar powersj commented on June 3, 2024

-buildmode=pie requires external (cgo) linking, but cgo is not enabled

Apparently, PIE requires cgo as well... in which case I'm not sure we would enable any of these. This led me to golang/go#64875 which seems to have a been a recent change and this list of supported PIE OS+Arch combos.

from telegraf.

powersj avatar powersj commented on June 3, 2024

I am going to close as this as something we won't change. Because we do not use cgo and do not wish to turn it on, then it doesn't make sense to enable anything further. If I am mistaken then feel free to comment or even put up a PR with a fix/change.

Thanks!

from telegraf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.