  We present the results of hydrodynamical simulations of gamma-ray burst jets
propagating through their stellar progenitor material and subsequently through
the surrounding circumstellar medium. We consider both jets that are injected
with constant properties in the center of the star and jets injected with a
variable luminosity. We show that the variability properties of the jet outside
the star are a combination of the variability injected by the engine and the
variability caused by the jet propagation through the star. Comparing power
spectra for the two cases shows that the variability injected by the engine is
preserved even if the jet is heavily shocked inside the star. Such shocking
produces additional variability at long time scales, of order several seconds.
Our findings suggest that the broad pulses of several seconds duration
typically observed in gamma-ray bursts are due to the interaction of the jet
with the progenitor, while the short-timescale variability, characterized by
fluctuations on time scales of milliseconds, has to be injected at the base of
the jet. Studying the properties of the fast variability in GRBs may therefore
provide clues to the nature of the inner engine and the mechanisms of energy
extraction from it.
