mdn / mdn/dex

Determine CSP `script-src` values automatically for inline scripts based on currently built/deployed index.html

Open
#74 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
6
Forks
4
Avg merge
21h 12m
Merged PRs (30d)
32

Description

Ultimately, what we should do is to generate and add a script-src item automatically for each inline script in the currently built index.html, and (for stage/prod builds) additionally an entry for each inline script in the currently deployed index.html.

Originally posted by @caugner in https://github.com/mdn/yari/issues/6992#issuecomment-1237059245

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the deployment code that produces the currently built and deployed index.html files, then identify where CSP script-src values are generated. Define how inline scripts are discovered in both files and how stage/production deployment differences are handled; done means each relevant inline script has an automatically generated script-src entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devops, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.