title: Accessing artifact from Task container
body: <p>I am trying to integrate a pipeline with Veracode (which uses a Java <code>jar</code> file in the pipeline process) but don't want to install Java on the agent. Rather I am just using a container to run the command in like so:</p>
  <pre><code>resources:
    containers:
      - container: java
        image: somepackagerepo.com/java-build
  
    ...(omitted)
  
    - script: |
         curl -sSO https://downloads.veracode.com/securityscan/pipeline-scan-LATEST.zip
         unzip -o pipeline-scan-LATEST.zip
         java -jar pipeline-scan.jar -vid $(ID) -vkey $(SECRET) -f $(build.ArtifactStagingDirectory)\MyApi || true
      target:
      container: java
      displayName: Run Veracode Scan
  </code></pre>
  <p>The issue is I always end up getting</p>
  <blockquote>
  <p>Insufficient permissions to read file: '/__w/6/aMyApi</p>
  </blockquote>
  <p>(not sure what the <code>a</code> in front of the <code>MyApi</code> comes from?)</p>
  <p>I figure that the container that the command is running in is having an issue reading the artifact that is published in the <code>$(build.ArtifactStagingDirectory)</code> area on the agent. Is there a way that I can copy my artifact down into my container or change permissions so it can be able to read it?</p>