@goosetools/goose-tools 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -2
- package/bin/goose-tools.js +61 -0
- package/lib/check/src/agent.js +90 -0
- package/lib/check/src/analyze.js +311 -0
- package/lib/check/src/client.js +136 -0
- package/lib/check/src/copy.js +355 -0
- package/lib/check/src/fixes.js +153 -0
- package/lib/check/src/frame.js +92 -0
- package/lib/check/src/guard.js +441 -0
- package/lib/check/src/index.js +18 -0
- package/lib/check/src/mcp-http.js +169 -0
- package/lib/check/src/mcp.js +153 -0
- package/lib/check/src/scan.js +55 -0
- package/lib/check/src/stack.js +61 -0
- package/lib/check/src/tlds.js +3 -0
- package/lib/check/src/view.js +130 -0
- package/lib/check/src/worker.js +257 -0
- package/lib/engine/src/bots.js +146 -0
- package/lib/engine/src/directives.js +131 -0
- package/lib/engine/src/exposure.js +70 -0
- package/lib/engine/src/frontend.js +157 -0
- package/lib/engine/src/headers.js +76 -0
- package/lib/engine/src/hidden-text.js +425 -0
- package/lib/engine/src/html.js +794 -0
- package/lib/engine/src/index.js +20 -0
- package/lib/engine/src/php.js +316 -0
- package/lib/engine/src/policies.js +234 -0
- package/lib/engine/src/reach.js +199 -0
- package/lib/engine/src/robots.js +275 -0
- package/lib/engine/src/secrets.js +142 -0
- package/lib/engine/src/signals.js +144 -0
- package/lib/rules/data/bots.json.js +1 -0
- package/lib/rules/data/exposure.json.js +1 -0
- package/lib/rules/data/frontend.json.js +1 -0
- package/lib/rules/data/headers.json.js +1 -0
- package/lib/rules/data/secrets.json.js +1 -0
- package/lib/ui/LICENSE-Inter.txt +93 -0
- package/lib/ui/assets.js +5 -0
- package/package.json +37 -4
- package/src/local.js +61 -0
- package/src/mcp.js +61 -0
- package/src/setup.js +395 -0
- package/src/site/auth.js +287 -0
- package/src/site/beacon.js +462 -0
- package/src/site/collect.js +484 -0
- package/src/site/handler.js +405 -0
- package/src/site/index.js +88 -0
- package/src/site/limits.js +48 -0
- package/src/site/pages.js +75 -0
- package/src/site/qr.js +318 -0
- package/src/site/reports.js +1117 -0
- package/src/site/source.js +68 -0
- package/src/site/store-pg.js +225 -0
- package/src/site/store.js +249 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the site's AI signals agree (port of Crawlers/Signals.php). Three places can state a
|
|
3
|
+
* preference: robots.txt rules per crawler, Content-Signal lines in robots.txt (Cloudflare's
|
|
4
|
+
* Content Signals Policy: search, ai-input, ai-train, each yes or no), and an llms.txt file.
|
|
5
|
+
* Providers that do not read Content-Signal or llms.txt follow robots.txt alone.
|
|
6
|
+
*
|
|
7
|
+
* Only clear contradictions are flagged: a signal of "no" while robots.txt lets every crawler of
|
|
8
|
+
* that kind in, or "yes" while robots.txt keeps them all out. Mixed rules are not a contradiction.
|
|
9
|
+
*
|
|
10
|
+
* Mapping: ai-train = training crawlers; search = search crawlers (the AI search crawlers plus
|
|
11
|
+
* Googlebot and Bingbot); ai-input = using content in AI answers, which the user fetchers and the
|
|
12
|
+
* AI search crawlers do.
|
|
13
|
+
*
|
|
14
|
+
* The PHP regexes have no u flag: \s and \b are ASCII, and \R also matches the byte 0x85. The
|
|
15
|
+
* llms.txt text is read as a byte string so both stay true here.
|
|
16
|
+
*/
|
|
17
|
+
import { WS, sprintf, toBytes } from './php.js';
|
|
18
|
+
import { allowed, generalSignals } from './robots.js';
|
|
19
|
+
import { tokens, TRAINING, SEARCH, USER } from './bots.js';
|
|
20
|
+
|
|
21
|
+
/** Wording in an llms.txt that asks AI not to use the content. */
|
|
22
|
+
const OPT_OUT = new RegExp(
|
|
23
|
+
`\\b(do not|don't|must not|may not)${WS}+(use|train|crawl|scrape|index)\\b|\\bno${WS}+(ai${WS}+)?training\\b|` +
|
|
24
|
+
`\\bnot${WS}+(be${WS}+)?used${WS}+(for|to|in)${WS}+(ai${WS}+|model${WS}+)?train|\\bopt(ed)?[\\t\\n\\v\\f\\r -]out\\b|\\bdisallow(ed)?\\b`,
|
|
25
|
+
'i',
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
/** Wording about AI, training, crawling or models. */
|
|
29
|
+
const AI_CONTEXT = new RegExp(
|
|
30
|
+
`\\b(ai|a\\.i|artificial intelligence|llms?|(large${WS}+)?language${WS}+models?|models?|machine${WS}+learning|` +
|
|
31
|
+
'train(s|ed|ing)?|crawl(s|ed|ing|ers?)?|scrap(e|es|ed|ing|ers?)|bots?)\\b',
|
|
32
|
+
'i',
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
/** The site's own content as the object, which an llms.txt addresses to AI by its nature. */
|
|
36
|
+
const CONTENT_OBJECT = new RegExp(`\\b(this|our|the|my|its)${WS}+(content|site|website|pages?|material|text|articles?|posts?|work)\\b`, 'i');
|
|
37
|
+
|
|
38
|
+
/** Sentence ends, or a line break (PHP \R: \r\n, \n, \v, \f, \r and the byte 0x85). */
|
|
39
|
+
const SENTENCES = new RegExp(`[.!?]+(?:${WS}|$)|\\r\\n|[\\n\\v\\f\\r\\x85]`);
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @typedef {object} Finding
|
|
43
|
+
* @property {string} id
|
|
44
|
+
* @property {string} level recommended, ok or unchecked.
|
|
45
|
+
* @property {string} sentence
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check.
|
|
50
|
+
* @param {import('./robots.js').RobotsTxt} robots The robots.txt crawlers get.
|
|
51
|
+
* @param {string | null | false} llms llms.txt contents, null when there is none, false when it
|
|
52
|
+
* could not be checked.
|
|
53
|
+
* @returns {Finding[]}
|
|
54
|
+
*/
|
|
55
|
+
export function check(robots, llms) {
|
|
56
|
+
/** @type {Finding[]} */
|
|
57
|
+
const out = [];
|
|
58
|
+
const training = stance(robots, tokens(TRAINING));
|
|
59
|
+
const search = stance(robots, [...tokens(SEARCH), 'Googlebot', 'bingbot']);
|
|
60
|
+
const input = stance(robots, [...tokens(USER), ...tokens(SEARCH)]);
|
|
61
|
+
const signals = generalSignals(robots);
|
|
62
|
+
/** @type {[string, string, string][]} */
|
|
63
|
+
const map = [
|
|
64
|
+
['ai-train', training, 'training crawlers (GPTBot, ClaudeBot, Google-Extended)'],
|
|
65
|
+
['search', search, 'search crawlers (OAI-SearchBot, Claude-SearchBot, PerplexityBot, Googlebot, Bingbot)'],
|
|
66
|
+
['ai-input', input, 'AI search crawlers and user-requested fetchers'],
|
|
67
|
+
];
|
|
68
|
+
for (const [key, st, who] of map) {
|
|
69
|
+
if (!Object.hasOwn(signals, key)) continue;
|
|
70
|
+
if (signals[key] === 'no' && st === 'allowed') {
|
|
71
|
+
out.push(
|
|
72
|
+
item(
|
|
73
|
+
'signal_' + key,
|
|
74
|
+
'recommended',
|
|
75
|
+
sprintf('robots.txt says %1$s=no in a Content-Signal line, but its rules let all %2$s in. Crawlers that do not read Content-Signal follow the rules.', key, who),
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
} else if (signals[key] === 'yes' && st === 'blocked') {
|
|
79
|
+
out.push(item('signal_' + key, 'recommended', sprintf('robots.txt says %1$s=yes in a Content-Signal line, but its rules block all %2$s.', key, who)));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (llms === false) {
|
|
83
|
+
out.push(item('llms_unchecked', 'unchecked', "Couldn't check whether the site has an llms.txt file, because the site could not request itself."));
|
|
84
|
+
} else if (typeof llms === 'string') {
|
|
85
|
+
const ai = [...tokens(TRAINING), ...tokens(SEARCH), ...tokens(USER)].filter((t) => t !== 'Google-Extended');
|
|
86
|
+
if (stance(robots, ai) === 'blocked') {
|
|
87
|
+
out.push(
|
|
88
|
+
item('llms_blocked', 'recommended', 'The site publishes llms.txt for AI tools, but robots.txt blocks every AI crawler checked, so the file sends the opposite signal.'),
|
|
89
|
+
);
|
|
90
|
+
} else {
|
|
91
|
+
const kept = ai.filter((t) => allowed(robots, t, '/') && !allowed(robots, t, '/llms.txt'));
|
|
92
|
+
if (kept.length) {
|
|
93
|
+
out.push(item('llms_disallowed', 'recommended', sprintf('robots.txt keeps %s from reading llms.txt, while the rest of the site is open to them.', kept.join(', '))));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (optsOut(llms) && training === 'allowed') {
|
|
97
|
+
out.push(item('llms_opt_out', 'recommended', 'llms.txt asks AI not to use the content, but robots.txt lets all training crawlers in. Crawlers follow robots.txt, not llms.txt.'));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (!out.length) {
|
|
101
|
+
if (Object.keys(signals).length === 0 && llms === null) {
|
|
102
|
+
out.push(item('agree', 'ok', 'Only robots.txt states AI preferences here (no Content-Signal lines, no llms.txt), so there is nothing to disagree.'));
|
|
103
|
+
} else {
|
|
104
|
+
out.push(item('agree', 'ok', 'robots.txt rules, Content-Signal lines and llms.txt agree.'));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Whether an llms.txt asks AI not to use the content: one sentence (or line) has opt-out wording
|
|
112
|
+
* and either wording about AI, training, crawling or models, or the site's content as its object.
|
|
113
|
+
* @param {string} llms
|
|
114
|
+
* @returns {boolean}
|
|
115
|
+
*/
|
|
116
|
+
function optsOut(llms) {
|
|
117
|
+
for (const sentence of toBytes(llms).split(SENTENCES)) {
|
|
118
|
+
if (OPT_OUT.test(sentence) && (AI_CONTEXT.test(sentence) || CONTENT_OBJECT.test(sentence))) return true;
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Whether robots.txt lets a set of crawlers fetch the home page: allowed (all), blocked (none) or mixed.
|
|
125
|
+
* @param {import('./robots.js').RobotsTxt} robots
|
|
126
|
+
* @param {string[]} list Tokens.
|
|
127
|
+
* @returns {string}
|
|
128
|
+
*/
|
|
129
|
+
export function stance(robots, list) {
|
|
130
|
+
let yes = 0;
|
|
131
|
+
for (const t of list) if (allowed(robots, t, '/')) yes++;
|
|
132
|
+
if (list.length === yes) return 'allowed';
|
|
133
|
+
return yes === 0 ? 'blocked' : 'mixed';
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @param {string} id
|
|
138
|
+
* @param {string} level
|
|
139
|
+
* @param {string} sentence
|
|
140
|
+
* @returns {Finding}
|
|
141
|
+
*/
|
|
142
|
+
function item(id, level, sentence) {
|
|
143
|
+
return { id, level, sentence };
|
|
144
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {"about":"AI crawler catalog: user agent patterns, robots.txt tokens, purposes and provider address lists. A regex is {source, flags}; the PHP pattern is \"/\" + source + \"/\" + flags.","source":"goose-tools/includes/src/Crawlers/Bots.php","commit":"5c12c0d","purposes":["training","search","user"],"prefilter":{"about":"Bots::maybe(): a user agent that fails this is never matched. An empty user agent fails too.","source":"GPTBot|OAI-SearchBot|ChatGPT-User|Claude|Perplexity|Googlebot\\/|bingbot\\/","flags":"i"},"match_order":"Bots::match() tries the bots in the order listed here and returns the first whose pattern matches. A bot with pattern null (Google-Extended) is a robots.txt token only and is never matched.","fields":{"provider":"Provider name.","purpose":"training, search or user.","pattern":"What identifies the crawler in a user agent, or null for a robots.txt token only.","token":"Its robots.txt token.","list":"Key of its address list in lists, or empty.","switch":"Whether the purpose switch applies to it (Googlebot and Bingbot are never switched).","robots":"Whether its provider says it follows robots.txt.","doc":"Provider documentation."},"bots":{"GPTBot":{"provider":"OpenAI","purpose":"training","pattern":{"source":"\\bGPTBot\\b","flags":"i"},"token":"GPTBot","list":"openai-gptbot","switch":true,"robots":true,"doc":"https://developers.openai.com/api/docs/bots"},"ClaudeBot":{"provider":"Anthropic","purpose":"training","pattern":{"source":"\\bClaudeBot\\b","flags":"i"},"token":"ClaudeBot","list":"anthropic","switch":true,"robots":true,"doc":"https://support.claude.com/en/articles/8896518"},"Google-Extended":{"provider":"Google","purpose":"training","pattern":null,"token":"Google-Extended","list":"","switch":true,"robots":true,"doc":"https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers"},"OAI-SearchBot":{"provider":"OpenAI","purpose":"search","pattern":{"source":"\\bOAI-SearchBot\\b","flags":"i"},"token":"OAI-SearchBot","list":"openai-searchbot","switch":true,"robots":true,"doc":"https://developers.openai.com/api/docs/bots"},"Claude-SearchBot":{"provider":"Anthropic","purpose":"search","pattern":{"source":"\\bClaude-SearchBot\\b","flags":"i"},"token":"Claude-SearchBot","list":"anthropic","switch":true,"robots":true,"doc":"https://support.claude.com/en/articles/8896518"},"PerplexityBot":{"provider":"Perplexity","purpose":"search","pattern":{"source":"\\bPerplexityBot\\b","flags":"i"},"token":"PerplexityBot","list":"perplexity-bot","switch":true,"robots":true,"doc":"https://docs.perplexity.ai/docs/resources/perplexity-crawlers"},"Googlebot":{"provider":"Google","purpose":"search","pattern":{"source":"\\bGooglebot\\/\\d","flags":"i"},"token":"Googlebot","list":"google-common","switch":false,"robots":true,"doc":"https://developers.google.com/crawling/docs/crawlers-fetchers/google-common-crawlers"},"Bingbot":{"provider":"Microsoft","purpose":"search","pattern":{"source":"\\bbingbot\\/\\d","flags":"i"},"token":"bingbot","list":"bing","switch":false,"robots":true,"doc":"https://www.bing.com/webmasters/help/which-crawlers-does-bing-use-8c184ec0"},"ChatGPT-User":{"provider":"OpenAI","purpose":"user","pattern":{"source":"\\bChatGPT-User\\b","flags":"i"},"token":"ChatGPT-User","list":"openai-user","switch":true,"robots":false,"doc":"https://developers.openai.com/api/docs/bots"},"Claude-User":{"provider":"Anthropic","purpose":"user","pattern":{"source":"\\bClaude-User\\b","flags":"i"},"token":"Claude-User","list":"anthropic","switch":true,"robots":true,"doc":"https://support.claude.com/en/articles/8896518"},"Perplexity-User":{"provider":"Perplexity","purpose":"user","pattern":{"source":"\\bPerplexity-User\\b","flags":"i"},"token":"Perplexity-User","list":"perplexity-user","switch":true,"robots":false,"doc":"https://docs.perplexity.ai/docs/resources/perplexity-crawlers"}},"lists":{"about":"Address lists: key => URL. Same JSON shape for all: {\"creationTime\": \"...\", \"prefixes\": [{\"ipv4Prefix\": ...}, {\"ipv6Prefix\": ...}]}. Anthropic publishes one list for its three crawlers.","urls":{"openai-gptbot":"https://openai.com/gptbot.json","openai-searchbot":"https://openai.com/searchbot.json","openai-user":"https://openai.com/chatgpt-user.json","anthropic":"https://claude.com/crawling/bots.json","perplexity-bot":"https://www.perplexity.ai/perplexitybot.json","perplexity-user":"https://www.perplexity.ai/perplexity-user.json","google-common":"https://developers.google.com/static/crawling/ipranges/common-crawlers.json","bing":"https://www.bing.com/toolbox/bingbot.json"}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {"about":"Exposed-file detection: whether a public response really contains the sensitive file, not a page a site serves for every address (soft 404). Exposure::exposed() is a switch statement in PHP; this file writes each case as a test expression. A regex is {source, flags}; the PHP pattern is \"/\" + source + \"/\" + flags.","source":"goose-tools/includes/src/Signals/Exposure.php","commit":"5c12c0d","input":{"about":"exposed(type, status, body). body is the first bytes of the response. The WordPress probe reads at most body_bytes (Wp/Probe.php MAX_BODY) and decides which files to request from the files it finds on disk, so the paths are WordPress-specific and not listed here.","body_bytes":4096},"statuses":{"about":"Any other HTTP status is not exposed, whatever the body.","list":[200,206]},"html":{"about":"The body looks like an HTML page when this regex matches its first first_bytes bytes.","source":"<(!doctype|html|head|body)\\b","flags":"i","first_bytes":1024},"expressions":{"about":"Test expressions. {all: [...]} is true when every part is true, {any: [...]} when one is. {regex} tests the body with a regex. {contains} is a case-sensitive substring test, {contains_ci} a case-insensitive one. {not_html: true} is true when the body does not look like an HTML page (see html). An unknown type is not exposed."},"types":{"log":{"all":[{"regex":{"source":"^\\[\\d{2}-[A-Za-z]{3}-\\d{4} \\d{2}:\\d{2}:\\d{2}|PHP (Fatal|Warning|Notice|Deprecated|Parse)","flags":"m"}},{"not_html":true}]},"config_backup":{"any":[{"contains":"DB_NAME"},{"contains":"DB_PASSWORD"}]},"env":{"all":[{"not_html":true},{"regex":{"source":"^[A-Z][A-Z0-9_]*=","flags":"m"}}]},"git":{"any":[{"regex":{"source":"^ref: refs\\/","flags":""}},{"regex":{"source":"^[0-9a-f]{40}\\s*$","flags":""}}]},"sql":{"all":[{"not_html":true},{"regex":{"source":"(CREATE TABLE|INSERT INTO|-- MySQL dump|-- MariaDB dump|-- Dump)","flags":"i"}}]},"phpinfo":{"any":[{"contains_ci":"phpinfo()"},{"all":[{"contains":"PHP Version"},{"contains_ci":"php.ini"}]}]},"listing":{"all":[{"regex":{"source":"<title>\\s*Index of \\/","flags":"i"}}]}},"code_not_data":["The order of the parts inside each expression follows the PHP, but every part is a pure test, so order does not change the answer.","PHP regexes without the u flag match bytes: \\d, \\s and \\b are ASCII only. In JavaScript, \\s also matches other spaces such as U+00A0. For the same answer on every body, a port can write [\\t\\n\\x0B\\f\\r ] where the PHP has \\s.","In PHP, $ without the m flag also matches just before a final newline. The git hash regex ends with \\s*$, so the answer is the same in JavaScript."]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {"about":"Checks for standalone sites that have no PHP equivalent: an empty page before JavaScript runs, Strict-Transport-Security, and secret keys in public JavaScript. JavaScript only: goose-tools does not read this file, and RulesDataTest does not check it. A regex is {source, flags} as in the other files; the JavaScript port reads it as a PHP pattern (\\s is ASCII whitespace).","empty_page":{"about":"Visible body text in the raw HTML, read as html.bodyText() reads it (Html::body_text in goose-tools): no JavaScript run, script, style and template left out, noscript counted, whitespace collapsed. Fewer than min_chars characters (Unicode code points) is flagged. A page with no body counts as 0.","id":"empty_page","min_chars":200,"sentence":"This page shows almost no text until JavaScript runs. AI crawlers that do not run JavaScript see an empty page."},"hsts":{"about":"Strict-Transport-Security on the HTTPS response (RFC 6797). Browsers ignore the header over plain HTTP, so read it from the HTTPS answer. Sent more than once, the first value counts. A value without a max-age, with a max-age that is not a whole number, or with max-age twice is invalid (RFC 6797, 6.1). max_age under min_max_age seconds (180 days) is flagged. %s in a sentence is the max-age in whole days (\"30 days\", \"1 day\"), or in hours, minutes or seconds under one day.","id":"hsts","header":"strict-transport-security","min_max_age":15552000,"sentences":{"missing":"This site doesn't send a Strict-Transport-Security header. Browsers may connect without encryption first.","invalid":"The Strict-Transport-Security header has no valid max-age. Browsers ignore the header.","short":"Strict-Transport-Security lasts only %s. Set max-age to at least 180 days."}},"keys":{"about":"Secret keys in public JavaScript. Every match on every line counts; long minified lines are read too. A match that passes example_filter in secrets.json is skipped, as in Secrets::scan(). Found values are masked like Secrets::mask(). A pattern with from_secrets uses that pattern in secrets.json. A pattern with jwt_role is a JWT: its payload is decoded (base64url JSON) and only a payload whose role equals jwt_role is a finding, so Supabase anon keys, which are public by design, are not flagged.","list":[{"type":"supabase_service_role","label":"Supabase service_role key","source":"\\beyJ[A-Za-z0-9_-]{8,}\\.eyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{16,}","flags":"","jwt_role":"service_role"},{"type":"openai","label":"OpenAI API key","about":"Project keys (sk-proj- and 40 or more key characters) and older user keys (sk- and exactly 48 letters and digits).","source":"\\bsk-(?:proj-[A-Za-z0-9_-]{40,}|[A-Za-z0-9]{48}\\b)","flags":""},{"type":"stripe","label":"Stripe secret key","about":"Live secret keys (sk_live_) and live restricted keys (rk_live_). Publishable keys (pk_live_) belong in front-end code and are not flagged.","from_secrets":"stripe"}]}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {"about":"Basic security headers on the home page. A header in list is missing when the response has no such header or its value is empty. The check names the missing headers in this order.","source":"goose-tools/includes/src/Report/ConfigurationArea.php","commit":"5c12c0d","list":[{"name":"X-Content-Type-Options","header":"x-content-type-options"},{"name":"X-Frame-Options","header":"x-frame-options","unless":{"about":"Not missing when Content-Security-Policy contains frame-ancestors (compared without case), because that directive replaces X-Frame-Options.","header":"content-security-policy","contains_ci":"frame-ancestors"}},{"name":"Referrer-Policy","header":"referrer-policy"}],"headers_read":{"about":"Header names are compared in lower case. A header sent more than once is joined with \", \" (Wp/Probe.php).","join":", "},"result":{"about":"check configuration.headers: ok when nothing is missing (or Goose Tools adds the headers itself), else attention with \"Missing: \" and the names joined with \", \". Not reported when the home page could not be requested.","id":"configuration.headers","missing_prefix":"Missing: ","missing_join":", "},"code_not_data":["PHP tests each value with empty(), so a header whose whole value is \"0\" also counts as missing.","The rule runs inside ConfigurationArea::checks(), which calls WordPress (options, the probe results, translations), so it has no golden cases: the JavaScript port is checked against this file only.","Strict-Transport-Security is read by the probe but not checked by this rule."]};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default {"about":"Credentials written into code: the known key formats, the generic password or secret rule, and how a found value is masked. A regex is {source, flags}; the PHP pattern is \"/\" + source + \"/\" + flags. PHP matches bytes, so lengths here are UTF-8 bytes.","source":"goose-tools/includes/src/Signals/Secrets.php","commit":"5c12c0d","lines":{"about":"Content is split into lines; line numbers start at 1. Lines longer than max_bytes are skipped (minified or data lines).","split":{"source":"\\r\\n|\\r|\\n","flags":""},"max_bytes":2000},"patterns":{"about":"Known formats, tried in this order on each line. The whole match is the secret. The first pattern that matches and passes example_filter gives the line's one finding; a line with a known finding is not checked by the generic rule.","list":[{"type":"aws","source":"\\b(?:AKIA|ASIA)[0-9A-Z]{16}\\b","flags":""},{"type":"stripe","source":"\\b(?:sk|rk)_live_[0-9a-zA-Z]{24,}\\b","flags":""},{"type":"google","source":"\\bAIza[0-9A-Za-z_\\-]{35}\\b","flags":""},{"type":"github","source":"\\b(?:gh[pousr]_[A-Za-z0-9]{36}|github_pat_[A-Za-z0-9_]{50,})\\b","flags":""},{"type":"slack","source":"\\bxox[abprs]-[A-Za-z0-9-]{10,}\\b","flags":""},{"type":"openai","source":"\\bsk-(?:proj-[A-Za-z0-9_-]{40,}|[A-Za-z0-9]{48}\\b)","flags":""},{"type":"private_key","source":"-----BEGIN (?:RSA |EC |DSA |OPENSSH |PGP |ENCRYPTED )?PRIVATE KEY(?: BLOCK)?-----","flags":""}]},"example_filter":{"about":"A known-format match that contains this is a documentation example, not a secret: it is skipped and the next pattern is tried.","source":"example|xxxx|0{8}","flags":"i"},"generic":{"about":"A secret-like name assigned a quoted literal. Checked only when no known format was found on the line. Capture group value_group is the value; it is reported only when random says it looks random.","source":"\\b(?:secret|api[_-]?key|apikey|access[_-]?token|auth[_-]?token|client[_-]?secret|password|passwd)\\b['\"]?\\s*(?:=>|=|:|,)\\s*['\"]([^'\"\\s]{16,})['\"]","flags":"i","value_group":1},"random":{"about":"Secrets::random(): a value is random when it does not match placeholder, has at least min_classes of the character classes, and its Shannon entropy (bits per byte, log base 2 over byte counts) is at least min_entropy.","placeholder":{"source":"your|example|sample|change|xxxx|\\*\\*\\*|placeholder|dummy|test|[{}$%<>]","flags":"i"},"classes":["[a-z]","[A-Z]","[0-9]"],"min_classes":2,"min_entropy":3.5},"mask":{"about":"Secrets::mask(): only the end shows. The first rule whose min_bytes is at most the value's length in bytes says how many of its last bytes follow the dots. A private_key finding is always masked as private_key.","dots":"••••","show_last":[{"min_bytes":16,"last":4},{"min_bytes":8,"last":2},{"min_bytes":0,"last":0}],"private_key":"-----BEGIN … PRIVATE KEY-----"},"remask":{"about":"Secrets::remask(): a mask stored in the older format (first and last 4 characters) becomes dots + the last 4. Anything else is returned as it is.","source":"^[^•]{4}••••([^•]{4})$","flags":"u"},"labels":{"aws":"AWS access key","stripe":"Stripe secret key","google":"Google API key","github":"GitHub token","slack":"Slack token","openai":"OpenAI API key","private_key":"Private key","generic":"Password or secret"}};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter) Inter-Italic[opsz,wght].ttf: Copyright 2016 The Inter Project Authors (https://github.com/rsms/inter)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
http://scripts.sil.org/OFL
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|