@fjall/util 36.0.0 → 38.0.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/dist/.minified +1 -1
- package/dist/appTypes.d.ts +27 -0
- package/dist/appTypes.js +1 -0
- package/dist/aws/index.d.ts +2 -1
- package/dist/aws/index.js +1 -1
- package/dist/aws/infraTags.d.ts +18 -0
- package/dist/aws/infraTags.js +1 -1
- package/dist/aws/resourceTypes.d.ts +54 -0
- package/dist/aws/resourceTypes.js +1 -0
- package/dist/backupTiers.d.ts +30 -3
- package/dist/backupTiers.js +1 -1
- package/dist/ciSetup.d.ts +25 -0
- package/dist/ciSetup.js +1 -0
- package/dist/codemod/statementTypes.d.ts +16 -0
- package/dist/codemod/statementTypes.js +1 -0
- package/dist/complianceIssue.d.ts +10 -0
- package/dist/complianceIssue.js +1 -1
- package/dist/deploy/approvalTokenOutput.d.ts +0 -7
- package/dist/deploy/approvalTokenOutput.js +1 -1
- package/dist/fjallHome.d.ts +4 -3
- package/dist/index.d.ts +12 -7
- package/dist/index.js +1 -1
- package/dist/infra/backupVault.d.ts +79 -2
- package/dist/infra/backupVault.js +1 -1
- package/dist/infra/tokenScopes.d.ts +15 -0
- package/dist/infra/tokenScopes.js +1 -1
- package/dist/insights/vocabulary.d.ts +29 -0
- package/dist/insights/vocabulary.js +1 -0
- package/dist/mcpProtocol/index.d.ts +47 -10
- package/dist/mcpProtocol/index.js +1 -1
- package/dist/nonEmptyPartial.d.ts +19 -0
- package/dist/nonEmptyPartial.js +1 -0
- package/dist/patterns/frameworkPatterns.d.ts +1 -8
- package/dist/patterns/index.d.ts +2 -2
- package/dist/patterns/index.js +1 -1
- package/dist/patterns/patternTypes.d.ts +57 -2
- package/dist/patterns/patternTypes.js +1 -1
- package/dist/posturePolicy/index.d.ts +3 -1
- package/dist/posturePolicy/index.js +1 -1
- package/dist/posturePolicy/registry.d.ts +73 -8
- package/dist/posturePolicy/registry.js +1 -1
- package/dist/posturePolicy/resourceKinds.d.ts +27 -0
- package/dist/posturePolicy/resourceKinds.js +1 -0
- package/dist/posturePolicy/tierConsent.d.ts +14 -7
- package/dist/posturePolicy/tierConsent.js +1 -1
- package/dist/scaffold/ensureGitignore.js +6 -6
- package/dist/securityHelpers.js +1 -1
- package/package.json +6 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var
|
|
1
|
+
var i=Object.defineProperty;var o=(e,t)=>i(e,"name",{value:t,configurable:!0});import{tierDefault as a}from"../backupTiers.js";import{ISSUE_STATUS_LABELS as r}from"./issueStatusLabels.js";import{EXPECTED_LANE_STAGES as c,EXPECTED_POLICY as u,expectedRowCause as p,policyRowKey as l}from"./registry.js";function $(e,t,n=u){return n.filter(s=>t.has(s.kind)&&s.knob.name==="backup.tier"&&s.tierDefault!==void 0&&a(e,s.tierDefault)===!1)}o($,"expectedRowsAtDefault");function g(e,t){return{rowKey:l({lane:"expected",row:e}),ruleId:e.ruleId,title:t,cause:p(e),expectation:e.expectation}}o(g,"tierConsentLine");function f(e){const t=e.slice(0,-1),n=e[e.length-1]??"";return t.length===0?n:`${t.join(", ")} or ${n}`}o(f,"orList");function d(e){const t=r.expected.clause,n=r.open.clause,s=f(c);return e===!0?`This organisation's posture is strict, so a posture scan lists each as ${n} on every account.`:e===null?`A posture scan lists each as ${t} on a ${s} account, or as ${n} everywhere if the organisation's posture is strict; the posture setting could not be read.`:`On a ${s} account a posture scan lists each as ${t}; on any other account it is ${n}.`}o(d,"expectedLaneWhereClause");const C="Posture findings this tier produces";function T(e,t){return{prefix:"Choosing ",tierName:e,rest:` keeps these defaults, and the first posture scan lists them. ${d(t)} Nothing is accepted on your behalf.`}}o(T,"tierConsentLead");export{C as TIER_CONSENT_NOTE_LABEL,d as expectedLaneWhereClause,$ as expectedRowsAtDefault,T as tierConsentLead,g as tierConsentLine};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var d=Object.defineProperty;var
|
|
1
|
+
var d=Object.defineProperty;var s=(o,e)=>d(o,"name",{value:e,configurable:!0});function l(){return process.getBuiltinModule("node:fs")}s(l,"nodeFs");function g(){return process.getBuiltinModule("node:path")}s(g,"nodePath");function p(o,e,u){const t=g().join(o,".gitignore");try{const r=l(),i=r.existsSync(t)?r.readFileSync(t,"utf8"):void 0;if(i===void 0){if(u.createIfMissing===!1)return!1;const n=u.header??"";return r.writeFileSync(t,`${n}${e.join(`
|
|
2
2
|
`)}
|
|
3
|
-
`,{encoding:"utf8"}),!0}const
|
|
4
|
-
`).map(
|
|
3
|
+
`,{encoding:"utf8"}),!0}const f=new Set(i.split(`
|
|
4
|
+
`).map(n=>n.trim())),c=e.filter(n=>!f.has(n));if(c.length===0)return!0;const a=i===""||i.endsWith(`
|
|
5
5
|
`)?"":`
|
|
6
|
-
`;return
|
|
7
|
-
${
|
|
6
|
+
`;return r.appendFileSync(t,`${a}${u.marker}
|
|
7
|
+
${c.join(`
|
|
8
8
|
`)}
|
|
9
|
-
`,"utf8"),!0}catch{return!1}}
|
|
9
|
+
`,"utf8"),!0}catch{return!1}}s(p,"ensureGitignoreEntries");export{p as ensureGitignoreEntries};
|
package/dist/securityHelpers.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=Object.defineProperty;var c=(t,_)=>p(t,"name",{value:_,configurable:!0});const D=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function
|
|
1
|
+
var p=Object.defineProperty;var c=(t,_)=>p(t,"name",{value:_,configurable:!0});const D=new Set(["NODE_OPTIONS","NODE_PATH","NODE_EXTRA_CA_CERTS","NODE_DEBUG","NODE_PRESERVE_SYMLINKS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","LD_BIND_NOW","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","PYTHONPATH","PYTHONSTARTUP","PERL5LIB","PERL5OPT","RUBYLIB","RUBYOPT","HOME","XDG_CONFIG_HOME","AWS_SHARED_CREDENTIALS_FILE","AWS_CONFIG_FILE","SHELL","BASH_ENV","ENV","ZDOTDIR"]);function h(t){return Object.fromEntries(Object.entries(t).filter(([_])=>!D.has(_.toUpperCase())))}c(h,"filterDangerousEnvVars");const P=/fjall_(?:ak|dk)_[A-Z2-7]{16}\.[A-Z2-7]{40}/,T=/(fjall_(?:ak|dk)_)[A-Z2-7]{16}\.[A-Z2-7]{40}/g,L=/\bfj_[0-9a-f]{8}_[0-9a-f]{48}\b/gi,$=/(fjall:\/\/plans\/)[^\s"'<>\\]+/g,s="***",l="[REDACTED]",g=`-----BEGIN ${l} PRIVATE KEY-----...-----END ${l} PRIVATE KEY-----`,R=String.raw`(?:next|continuation|pagination|page|forward|backward)+token`,S=String.raw`(?!ghu_|ghs_|ghp_|gho_|github_pat_|(?:sk|rk)_(?:live|test)_|whsec_|fjall_(?:ak|dk)_|fj_[0-9a-f]{8}_|AKIA|ASIA|%[a-zA-Z])`,i=String.raw`password|passwd|secret|api[_-]?key|token|auth|credential`,N=String.raw`arn:aws[a-z-]*:[a-z0-9-]+:[a-z0-9-]*:[0-9]*:`,w=new RegExp(String.raw`(?<!"${R}":\s*")`+String.raw`(?<="[a-zA-Z0-9_-]*(?:${i})":\s*")`+S+String.raw`(?:[^"\\]|\\.)+`,"gi"),o=String.raw`(?:\\?["'])?`,I=String.raw`(?:[^\s"'\\]|\\[^\s"'nrt])+`,O=new RegExp(String.raw`(?<!${R}\s*[=:]\s*${o})`+String.raw`(?<!${N}(?:${i})\s*[=:]\s*${o})`+String.raw`(?<=(?<!/)(?:${i})\s*[=:]\s*${o})`+S+I,"gi"),f=new RegExp(String.raw`(?<!${N})(?<![a-zA-Z])(${i})([=:])${o}${I}`,"gi");function k(t){return t.replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----(?:[^"\\]|\\[\\nrt"])*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>g).replace(/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,()=>g).replace(/(\w+:\/\/[^:\s"']+:)[^@\s"']+(@)/gi,(_,e,a)=>`${e}${s}${a}`).replace(f,(_,e,a)=>`${e}${a}${s}`).replace(w,s).replace(O,s).replace(/\b(ghu_|ghs_|ghp_|gho_|github_pat_)[A-Za-z0-9_]+/g,(_,e)=>`${e}${s}`).replace(/\b(sk|rk)_(live|test)_[A-Za-z0-9]{8,}/g,(_,e,a)=>`${e}_${a}_${s}`).replace(/\bwhsec_[A-Za-z0-9]{8,}/g,()=>`whsec_${s}`).replace(/(?<=Authorization:\s*Bearer\s+)[A-Za-z0-9._~+/=-]+/gi,s).replace(/\b(AKIA|ASIA)[A-Z0-9]{12,}\b/g,(_,e)=>`${e}${s}`).replace(/(?<=aws_secret_access_key\s*=\s*["']?|SecretAccessKey[=:]\s*|"(aws)?secretAccessKey":\s*"|"aws_secret_access_key":\s*")[A-Za-z0-9/+=]{40,}/gi,s).replace(/(?<="(aws)?sessionToken":\s*"|"aws_session_token":\s*")[^"]+/gi,s).replace(/(?<=aws_session_token\s*[=:]\s*["']?|SessionToken[=:]\s*["']?)[^\s"']+/gi,s).replace(/(?<="(internal[Aa]piKey|fjallCallbackToken)":\s*")[^"]+/g,s).replace(T,(_,e)=>`${e}${s}`).replace(L,()=>`fj_${s}`).replace($,(_,e)=>`${e}${s}`)}c(k,"maskSensitiveOutput");function G(t){const _=[];let e="",a=!1,r=!1,A=!1,n=!1;for(const E of t){if(A){e+=E,A=!1;continue}if(E==="\\"&&!a){A=!0;continue}if(E==="'"&&!r){a=!a,n=!0;continue}if(E==='"'&&!a){r=!r,n=!0;continue}if(E===" "&&!a&&!r){(e||n)&&(_.push(e),e="",n=!1);continue}e+=E}if(a||r)throw new Error(`Unbalanced ${a?"single":"double"} quote in command: ${t.slice(0,80)}`);if(A)throw new Error(`Trailing backslash in command: ${t.slice(0,80)}`);return(e||n)&&_.push(e),_}c(G,"parseShellArgs");export{D as DANGEROUS_ENV_VARS,s as MASKED_VALUE_MARKER,l as REDACTED_KEY_SENTINEL,P as SCOPED_TOKEN_REGEX,h as filterDangerousEnvVars,k as maskSensitiveOutput,G as parseShellArgs};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fjall/util",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "38.0.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/fjall-tech/fjall.git",
|
|
@@ -119,6 +119,10 @@
|
|
|
119
119
|
"types": "./dist/insights/computePatternFingerprint.d.ts",
|
|
120
120
|
"default": "./dist/insights/computePatternFingerprint.js"
|
|
121
121
|
},
|
|
122
|
+
"./insights/vocabulary": {
|
|
123
|
+
"types": "./dist/insights/vocabulary.d.ts",
|
|
124
|
+
"default": "./dist/insights/vocabulary.js"
|
|
125
|
+
},
|
|
122
126
|
"./mcpProtocol": {
|
|
123
127
|
"types": "./dist/mcpProtocol/index.d.ts",
|
|
124
128
|
"default": "./dist/mcpProtocol/index.js"
|
|
@@ -183,6 +187,6 @@
|
|
|
183
187
|
"@smithy/core": "2.5.5"
|
|
184
188
|
},
|
|
185
189
|
"engines": {
|
|
186
|
-
"node": ">=22.
|
|
190
|
+
"node": ">=22.3.0"
|
|
187
191
|
}
|
|
188
192
|
}
|