Giter Site home page Giter Site logo

Custom headers? about lighthouse-ci-action HOT 3 CLOSED

treosh avatar treosh commented on July 27, 2024 1
Custom headers?

from lighthouse-ci-action.

Comments (3)

rdok avatar rdok commented on July 27, 2024 1

Absolutely there is a way!

  1. Create a new file .github/workflows/lighthouserc.json with:
{
  "ci": {
    "collect": {
      "settings": {
        "extraHeaders": {
          "Lighthouse-Key": "{{LIGHTHOUSE_KEY}}"
        }
      }
    }
  }
}
  1. Add another job step before the treosh/lighthouse-ci-action step to transpile the value using your secret:
- name: Prepare envs
  run: |
     sed -i "s/{{LIGHTHOUSE_KEY}}/${YOUR_SECRET}/g" .github/workflows/lighthouserc.json
  1. Finally set a path to this custom lighthouserc file
uses: treosh/lighthouse-ci-action@v8
with:
  configPath: .github/workflows/lighthouserc.json

from lighthouse-ci-action.

ZebraFlesh avatar ZebraFlesh commented on July 27, 2024

Thank you for the creative work around! Unfortunately this results in the secret landing on the disk as just a value. It could potentially find it's way into logs and other output. That's why I wanted to use the CLI flag functionality (so it would only exist in the virtual environment's memory and preferably as an environment variable; Actions would be better able to track that it's a secret value and obscure it from outputs).

Edit to add: If someone tells me, "just write your AWS access key and secret to a file during the build", that's a non-starter from a security perspective.

from lighthouse-ci-action.

rdok avatar rdok commented on July 27, 2024

Makes sense 👍

from lighthouse-ci-action.

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.