Git Product home page Git Product logo

Comments (6)

tarragon avatar tarragon commented on June 1, 2024

Things to be wary of:

  • on secure systems, /tmp may have execute rights disabled, meaning any scripts copied there can't be run.
  • I would suggest that the location should be configurable, and/or pulled from TMPDIR env variable.
  • Use safe tempfile creation to avoid security issues raised by clobbering symlinks.

from agent.

keithpitt avatar keithpitt commented on June 1, 2024

I was gonna use this: http://golang.org/pkg/os/#TempDir Which I think handles all that for you automatically.

from agent.

keithpitt avatar keithpitt commented on June 1, 2024

I've been thinking about this, and I don't think I want to do it. The only reason is, I like the idea of being about to do a: ps aux | grep bootstrap.sh to see if the script is running and it's location. What do you think @tarragon? Do you think this is worth changing?

from agent.

tarragon avatar tarragon commented on June 1, 2024

Using a ps like that won't be reliable, for instance if you are using a system and running multiple buildbox agents in docker or running multiple agents on the same box. That said to get the result you want you could use a temporary directory instead, perhaps under the buildbox path, and copy the bootstrap.sh file there instead using it's original name.

from agent.

jmartelletti avatar jmartelletti commented on June 1, 2024

Never "ps | grep" anyway, always "pgrep" - Your friendly neighbourhood neckbeard :neckbeard:

from agent.

keithpitt avatar keithpitt commented on June 1, 2024

I'm going to close this. If it crops up and starts being an issue, perhaps I can add a config option for it 🍂

from agent.

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.