百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

csp-evaluator

> 编程语言
开源

CSP 评估器核心库简介 -------------------------------------------------------------------------------- 请注意:本文档仅供参考,不构成正式文档。

400 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

CSP 评估器核心库简介 -------------------------------------------------------------------------------- 请注意:本文档仅供参考,不构成正式文档。

CSP Evaluator Core Library

Introduction


Please note: this is not an official Google product.

CSP Evaluator allows developers and security experts to check if a Content Security Policy (CSP) serves as a strong mitigation against cross-site scripting attacks. It assists with the process of reviewing CSP policies, and helps identify subtle CSP bypasses which undermine the value of a policy. CSP Evaluator checks are based on a large-scale study and are aimed to help developers to harden their CSP and improve the security of their applications. This tool is provided only for the convenience of developers and Google provides no guarantees or warranties for this tool.

CSP Evaluator comes with a built-in list of common CSP allowlist bypasses which reduce the security of a policy. This list only contains popular bypasses and is by no means complete.

The CSP Evaluator library + frontend is deployed here: https://csp-evaluator.withgoogle.com/

Installing

This library is published to https://www.npmjs.com/package/csp_evaluator. You can install it via:

bash
npm install csp_evaluator

Building

To build, run:

bash
npm install && tsc --build

Testing

To run unit tests, run:

bash
npm install && npm test

Example Usage

javascript
import {CspEvaluator} from "csp_evaluator/dist/evaluator.js";
import {CspParser} from "csp_evaluator/dist/parser.js";

const parsed = new CspParser("script-src https://google.com").csp;
console.log(new CspEvaluator(parsed).evaluate());

Issues· 16 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScript

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言