Make autoCSP configurable
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- angular, typescript
- Domaine
- build-system, security
Piste de recherche
Commencez par la commande de build de la CLI et le chemin existant de génération d’autoCSP. Suivez la manière dont la Content-Security-Policy générée est assemblée, puis vérifiez que les directives demandées peuvent être configurées et que la politique résultante fonctionne avec les cas nginx et PWA indiqués.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Command
build
Description
Great to see autoCSP property cause looks like it's the only way to go with PWA.
Please could you make possible to add extra options to generated CSP ? I'd love to specify for example default-src, img-src e.t.c.
Describe the solution you'd like
Make it somehow configurable:
"autoCsp": {
"default-src": "'self'",
"img-src": "* data: blob:",
"media-src": "'self' data:"
}
Describe alternatives you've considered
A header still will be needed for frame-ancestors to add (for example in nginx):
add_header Content-Security-Policy "frame-ancestors 'none'";
It works nicely in conjuction with autoCSP and I can even specify
add_header Content-Security-Policy "frame-ancestors 'none'; media-src 'self' data:";
The issue here is that if I add default-src
add_header Content-Security-Policy "default-src 'self'; frame-ancestors 'none'; media-src 'self' data:";
Angular app will be broken because the least permissive policy (this one) wins.
To workaround it I will have to specify each case separately here worker-src; frame-src e.t.c but do not specify script-src which will make it enormous and hard to maintain.
I would love to specify them in index.html directly
- Langage dominant
- TypeScript
- Étoiles
- 27k
- Forks
- 11.8k
- Merge moyen
- 16 h 35 min
- PR mergées (30 j)
- 176
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de angular/angular-cli
-
Can't use an array of hostnames in --allowedHosts cli parameter in @angular/build:dev-server Ouvertearea: @angular/build gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
angular/angular-cli#33055 · 1 commentaire · 3 réactions ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Ouvertearea: @angular/build gemini-triaged
Difficulté 4/5 3-5 jours Accessibilité débutants 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 personne assignée ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 personne assignée ·
Toutes les issues de angular/angular-cli
Issues similaires
-
S: triage
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
-
fix(errors): EHOSTUNREACH from a happy-eyeballs connect is reported as a resolver error (STAMP-80) Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
snapshot-labs/stamp#666 ·
-
fix(api): prevent leaderboard SSE heartbeat from starting after disconnect during initial load Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
GauravKarakoti/SecureFlow#1070 · 1 commentaire ·
-
feature:Languages/Translations good first issue ready Web
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
digitalfabrik/integreat-app#4394 ·