code stringlengths 12 2.05k | label int64 0 1 | programming_language stringclasses 9
values | cwe_id stringlengths 6 14 | cwe_name stringlengths 5 103 ⌀ | description stringlengths 36 1.23k ⌀ | url stringlengths 36 48 ⌀ | label_name stringclasses 2
values |
|---|---|---|---|---|---|---|---|
handler: (req, reply) => {
reply.send(req.url)
}, | 1 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
export function parse(formula: string): [a: number, b: number] {
formula = formula.trim().toLowerCase();
if (formula === "even") {
return [2, 0];
} else if (formula === "odd") {
return [2, 1];
}
const parsed = formula.match(RE_NTH_ELEMENT);
if (!parsed) {
throw new Err... | 0 | TypeScript | NVD-CWE-Other | Other | NVD is only using a subset of CWE for mapping instead of the entire CWE, and the weakness type is not covered by that subset. | https://nvd.nist.gov/vuln/categories | vulnerable |
switchToInvites: async () => {
await this.waitAndClick('.e_InvTabB');
await this.invitedUsersList.waitUntilLoaded();
}, | 0 | TypeScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | vulnerable |
module.exports = async function(tag) {
if (!tag || ![ 'string', 'number' ].includes(typeof tag)) {
throw new TypeError(`string was expected, instead got ${tag}`);
}
const { message, author, email } = this;
await Promise.all([
spawn(`config user.name "${await author}"`),
spawn(`config user.email "${await ema... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
_resolvePath(path = '.') {
const clientPath = (() => {
path = nodePath.normalize(path);
if (nodePath.isAbsolute(path)) {
return nodePath.join(path);
} else {
return nodePath.join(this.cwd, path);
}
})();
const fsPath = (() => {
const resolvedPath = nodePath.j... | 0 | TypeScript | CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the software does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of t... | https://cwe.mitre.org/data/definitions/22.html | vulnerable |
export function setupCleanupOnExit(cssPath: string) {
if (!hasSetupCleanupOnExit){
process.on('SIGINT', () => {
console.log('Exiting, running CSS cleanup');
exec(`rm -r ${cssPath}`, function(error) {
if (error) {
console.error(error);
process.exit(1);
}
co... | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
constructor(type: VCSType = 'git') {
this.type = type;
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
export function handler (type, name, fn) {
if (
type === 'constructor' ||
type === '__proto__' ||
name === 'constructor' ||
name === '__proto__'
) {
return
}
if (arguments.length > 2) {
handlers[type][name] = fn
}
return handlers[type][name]
} | 1 | TypeScript | CWE-74 | Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') | The software constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/74.html | safe |
return { url: Url.format(parsedUrl), host };
}
}
if (addresses.length > 0) {
throw new Meteor.Error(403,
"can't connect to blacklisted private network address: " + parsedUrl.hostname +
"; the Sandstorm server admin can change the blacklist in the admin settings");
} else {
throw... | 1 | TypeScript | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | safe |
const getCdnMarkup = ({ version, cdnUrl = '//cdn.jsdelivr.net/npm', faviconUrl }) => `
<link rel="stylesheet" href="${cdnUrl}/graphql-playground-react${ | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
constructor(line: string, lineNumber: number) {
super(`Unsupported type of line: [${lineNumber}] "${line}"`);
this.line = line;
this.lineNumber = lineNumber;
} | 1 | TypeScript | CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. | https://cwe.mitre.org/data/definitions/1321.html | safe |
async function waitSessionCountChange(currentSessionCountMonitoredItem) {
return await new Promise((resolve,reject) => {
const timer = setTimeout(() => {
reject(new Error("Never received ", currentSessionCountMonitoredItem.toString()));
}, 5000);
currentSessionCountMonitoredIte... | 0 | TypeScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
userId: projectUsers.findOne().users.find((elem) => elem._id === entry._id.userId)?.profile?.name, | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function validateKey(key) {
if (usafeProperties.includes(key)) {
throw new Error('Property "' + key + '" is not a valid key');
}
} | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
TEST_F(AsStringGraphTest, OnlyOneOfScientificAndShortest) {
Status s = Init(DT_FLOAT, /*fill=*/"", /*width=*/-1, /*precision=*/-1,
/*scientific=*/true, /*shortest=*/true);
ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
ASSERT_TRUE(
absl::StrContains(s.error_message(),
... | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
[req.locale]: self.getBrowserBundles(req.locale)
};
if (req.locale !== self.defaultLocale) {
i18n[self.defaultLocale] = self.getBrowserBundles(self.defaultLocale);
}
const result = {
i18n,
locale: req.locale,
defaultLocale: self.defaultLo... | 0 | TypeScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | vulnerable |
function lazyLoadCustomEmoji(element: HTMLElement): void {
const img = createElement('img', CLASS_CUSTOM_EMOJI) as HTMLImageElement;
if (element.dataset.emoji) {
img.src = element.dataset.emoji;
element.innerText = '';
element.appendChild(img);
}
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
export function getProfileFromDeeplink(args): string | undefined {
// check if we are passed a profile in the SSO callback url
const deeplinkUrl = args.find(arg => arg.startsWith('element://'));
if (deeplinkUrl && deeplinkUrl.includes(SEARCH_PARAM)) {
const parsedUrl = new URL(deeplinkUrl);
... | 0 | TypeScript | CWE-416 | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. | https://cwe.mitre.org/data/definitions/416.html | vulnerable |
componentDidMount () {
this.store.gotoUrl(this.props.params.url);
return this.store.generateToken();
} | 0 | TypeScript | CWE-346 | Origin Validation Error | The software does not properly verify that the source of data or communication is valid. | https://cwe.mitre.org/data/definitions/346.html | vulnerable |
function g_sendError(channel: ServerSecureChannelLayer, message: Message, ResponseClass: any, statusCode: StatusCode): void {
const response = new ResponseClass({
responseHeader: { serviceResult: statusCode }
});
return channel.send_response("MSG", response, message);
} | 0 | TypeScript | CWE-770 | Allocation of Resources Without Limits or Throttling | The software allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
TEST_F(AsStringGraphTest, FloatShortest) {
TF_ASSERT_OK(Init(DT_FLOAT, /*fill=*/"", /*width=*/-1, /*precision=*/-1,
/*scientific=*/false, /*shortest=*/true));
AddInputFromArray<float>(TensorShape({4}), {-42, 0, 3.14159, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRI... | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
const addReplyToEvent = (event: any) => {
const { processId, frameId } = event;
event.reply = (...args: any[]) => {
event.sender.sendToFrame([processId, frameId], ...args);
};
}; | 1 | TypeScript | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | safe |
exports.validateNumber = function validateNumber(value, name) {
if (typeof value !== 'number')
throw new ERR_INVALID_ARG_TYPE(name, 'number', value);
}; | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
TEST_F(AsStringGraphTest, FillWithChar4) {
Status s = Init(DT_INT32, /*fill=*/"n");
ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
ASSERT_TRUE(
absl::StrContains(s.error_message(), "Fill argument not supported"));
} | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
return code.includes(hash);
});
if (containsMentions) {
// disable code highlighting if there is a mention in there
// highlighting will be wrong anyway because this is not valid code
return code;
}
return hljs.highlightAuto(code).value;
},
}); | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
export default function publishVote(pollId, pollAnswerId) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'RespondToPollReqMsg';
const { meetingId, requesterUserId } = extractCredentials(this.userId);
check(pollAnswerId, Number);
ch... | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
return { kind: 'redirect', to: `/signin?from=${encodeURIComponent(req!.url!)}` };
}
}; | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
${renderConfig(extendedOptions)}
<div id="root" />
<script type="text/javascript">
window.addEventListener('load', function (event) {
${loading.script}
const root = document.getElementById('root');
root.classList.add('playgroundIn');
const configText = document.getEl... | 1 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
const createCommand = ({ ref, path }: Input) => {
return `git show ${ref}:${path}`;
}; | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function localMessage(msg, source) {
const output = source.output;
output.add(formatMessage(msg, output));
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function get(target, path) {
"use strict";
try {
return reduce(target, path);
} catch(ex) {
console.error(ex);
return;
}
} | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
getScriptOperations(script: Buffer) {
let ops: PushDataOperation[] = [];
try {
let n = 0;
let dlen: number;
while (n < script.length) {
let op: PushDataOperation = { opcode: script[n], data: null }
n += 1;
if(op.opco... | 0 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
link: new ApolloLink((operation, forward) => {
return forward(operation).map(response => {
const context = operation.getContext();
const {
response: { headers },
} = context;
expect(headers.get('access-control-allow-origin')).... | 1 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | safe |
constructor() {
super();
this._aborted = 0;
this._helloReceived = false;
this.receiveBufferSize = 0;
this.sendBufferSize = 0;
this.maxMessageSize = 0;
this.maxChunkCount = 0;
this.protocolVersion = 0;
} | 0 | TypeScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
this._transport.on("message", (messageChunk: Buffer) => {
/**
* notify the observers that ClientSecureChannelLayer has received a message chunk
* @event receive_chunk
* @param message_chunk
*/
this.emit("receive_chunk", messageChu... | 0 | TypeScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
text: text({ url, host }),
html: html({ url, host, email }),
})
},
options,
}
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
) => [number, number, string] | undefined; | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
export function get(key: "treeIcons"): boolean;
export function get(key: "apiUrl"): string; | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
api.update = async function(req, res) {
const { commentForm } = req.body;
const pageId = commentForm.page_id;
const comment = commentForm.comment;
const isMarkdown = commentForm.is_markdown;
const commentId = commentForm.comment_id;
const author = commentForm.author;
if (comment === '') ... | 0 | TypeScript | CWE-639 | Authorization Bypass Through User-Controlled Key | The system's authorization functionality does not prevent one user from gaining access to another user's data or record by modifying the key value identifying the data. | https://cwe.mitre.org/data/definitions/639.html | vulnerable |
new ParsingError('only trash', 7),
],
});
}); | 1 | TypeScript | CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. | https://cwe.mitre.org/data/definitions/1321.html | safe |
export function cleanObject(obj: any): any {
return Object.entries(obj).reduce(
(obj, [key, value]) =>
value === undefined
? obj
: {
...obj,
[key]: value
},
{}
);
} | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
function processUrl(url: string): void {
if (!global.mainWindow) return;
console.log("Handling link: ", url);
global.mainWindow.loadURL(url.replace(PROTOCOL, "vector://"));
} | 0 | TypeScript | CWE-416 | Use After Free | Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. | https://cwe.mitre.org/data/definitions/416.html | vulnerable |
TEST_F(AsStringGraphTest, Float_5_2_Format) {
TF_ASSERT_OK(Init(DT_FLOAT, /*fill=*/"", /*width=*/5, /*precision=*/2));
AddInputFromArray<float>(TensorShape({4}), {-42, 0, 3.14159, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRING, TensorShape({4}));
test::FillValues<tstring>(&expected... | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
const walkHtmlTokens = (tokens:any[]) => {
if (!tokens || !tokens.length) return;
for (const token of tokens) {
if (!['html_block', 'html_inline'].includes(token.type)) {
walkHtmlTokens(token.children);
continue;
}
const cacheKey = md5(escape(token.content));
let sanitizedContent = c... | 1 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
[_sanitize](svg) {
return svg.removeAttr('onload');
} | 0 | TypeScript | CWE-94 | Improper Control of Generation of Code ('Code Injection') | The software constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. | https://cwe.mitre.org/data/definitions/94.html | vulnerable |
export function get(key: "apiUrl"): string;
export function get(key: "images.markdownPasteFormat"): "markdown" | "html"; | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
buildRawNFT1GenesisTx(config: configBuildRawNFT1GenesisTx, type = 0x01) {
let config2: configBuildRawGenesisTx = {
slpGenesisOpReturn: config.slpNFT1GenesisOpReturn,
mintReceiverAddress: config.mintReceiverAddress,
mintReceiverSatoshis: config.mintReceiverSatoshis,
... | 0 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
OpenSSH_Public.parse = (str) => {
const m = regexp.exec(str);
if (m === null)
return null;
// m[1] = full type
// m[2] = base type
// m[3] = base64-encoded public key
// m[4] = comment
const fullType = m[1];
const baseType = m[2];
const data = Buffer.from(m[3], 'base64');
... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
constructor (
private sanitizer: DomSanitizer,
private serverService: ServerService,
private notifier: Notifier
) { } | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function process_request_callback(requestData: RequestData, err?: Error | null, response?: Response) {
assert(typeof requestData.callback === "function");
const request = requestData.request;
if (!response && !err && requestData.msgType !== "CLO") {
// this case happens when CLO is called an... | 0 | TypeScript | CWE-770 | Allocation of Resources Without Limits or Throttling | The software allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor. | https://cwe.mitre.org/data/definitions/770.html | vulnerable |
export function add_attribute(name, value, boolean) {
if (value == null || (boolean && !value)) return '';
const assignment = (boolean && value === true) ? '' : `="${escape_attribute_value(value.toString())}"`;
return ` ${name}${assignment}`;
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
return next.handle(req).pipe(catchError(err => {
if (err.status === 401) {
this.authenticationService.logout();
if (!req.url.includes('/v3/auth')) {
// only reload the page if we aren't on the auth pages, this is so that we can display the auth errors.
const stateUrl = thi... | 0 | TypeScript | CWE-613 | Insufficient Session Expiration | According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization." | https://cwe.mitre.org/data/definitions/613.html | vulnerable |
export function getExtensionPath(): string {
return extensionPath;
} | 0 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | vulnerable |
function generate(
target: any,
hierarchies: SetupPropParam[],
forceOverride?: boolean
) {
let current = target;
hierarchies.forEach(info => {
const descriptor = normalizeDescriptor(info);
const {value, type, create, override, created, skipped, got} = descriptor;
const name = getNonEmptyPropName(current, de... | 0 | TypeScript | CWE-1321 | Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') | The software receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. | https://cwe.mitre.org/data/definitions/1321.html | vulnerable |
exports.Terminal = command => new Promise((resolve, reject) => {
child_process.exec(command, {maxBuffer : 1500 * 1024}, function(error, stdout, stderr) {
if( !!error ) reject( error )
else resolve( stdout || stderr )
})
}) | 0 | TypeScript | NVD-CWE-noinfo | null | null | null | vulnerable |
from: { name: globalDb.getServerTitle(), address: returnAddress },
subject: "Testing your Sandstorm's SMTP setting",
text: "Success! Your outgoing SMTP is working.",
smtpConfig: restConfig,
});
} catch (e) {
// Attempt to give more accurate error messages for a variety of... | 1 | TypeScript | CWE-287 | Improper Authentication | When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct. | https://cwe.mitre.org/data/definitions/287.html | safe |
export function stringEncode(string: string) {
let encodedString = '';
for (let i = 0; i < string.length; i++) {
let charCodePointHex = string.charCodeAt(i).toString(16);
encodedString += `\\u${charCodePointHex}`;
}
return encodedString;
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
init: (buf, start) => {
buffer = buf;
pos = (typeof start === 'number' ? start : 0);
}, | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
([ key, value ]) => ({ [key]: exec.bind(null, `git show -s --format=%${value}`) }),
), | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
export async function csrfCheck(ctx: AppContext, isPublicRoute: boolean) {
if (isApiRequest(ctx)) return;
if (isPublicRoute) return;
if (!['POST', 'PUT'].includes(ctx.method)) return;
if (ctx.path === '/logout') return;
const userId = ctx.joplin.owner ? ctx.joplin.owner.id : '';
if (!userId) return;
const fiel... | 1 | TypeScript | CWE-352 | Cross-Site Request Forgery (CSRF) | The web application does not, or can not, sufficiently verify whether a well-formed, valid, consistent request was intentionally provided by the user who submitted the request. | https://cwe.mitre.org/data/definitions/352.html | safe |
const assigner = ( ...args: any[] ) => {
console.log( { args } )
return args.reduce( ( a, b ) => {
if ( untracker.includes( a ) ) throw new TypeError( `can't convert ${a} to object` )
if ( useuntrack && untracker.includes( b ) ) return a
Object.keys( b ).forEach( key => {
if ( untrac... | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
constructor() {
super();
let Q = async A => { A };
}
| 1 | TypeScript | CWE-119 | Improper Restriction of Operations within the Bounds of a Memory Buffer | The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer. | https://cwe.mitre.org/data/definitions/119.html | safe |
export declare function applyCommandArgs(configuration: any, argv: string[]): void;
export declare function setDeepProperty(obj: any, propertyPath: string, value: any): void; | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
function applyInlineFootnotes(elem) {
const footnoteRefs = elem.querySelectorAll("sup.footnote-ref");
footnoteRefs.forEach((footnoteRef) => {
const expandableFootnote = document.createElement("a");
expandableFootnote.classList.add("expand-footnote");
expandableFootnote.innerHTML = iconHTML("ellipsis-h"... | 0 | TypeScript | CWE-755 | Improper Handling of Exceptional Conditions | The software does not handle or incorrectly handles an exceptional condition. | https://cwe.mitre.org/data/definitions/755.html | vulnerable |
static buildSendOpReturn(config: configBuildSendOpReturn, type = 0x01) {
return SlpTokenType1.buildSendOpReturn(
config.tokenIdHex,
config.outputQtyArray,
type
)
} | 0 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
get: ({ params }) => ({ status: 200, body: { id: params.userId, name: 'bbb' } })
})) | 0 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
setEntries(entries) {
if (entries.length === 0) {
this.emptyList();
return;
}
let htmlToInsert = '';
for (let timesheet of entries) {
let label = this.attributes['template']
.replace('%customer%', timesheet.project.customer.name)
... | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
export function applyCommandArgs(configuration: any, argv: string[]) {
if (!argv || !argv.length) {
return;
}
argv = argv.slice(2);
const parsedArgv = yargs(argv);
const argvKeys = Object.keys(parsedArgv);
if (!argvKeys.length) {
return;
}
debug("Appling command arguments:", parsedArgv);
const CONFIG_P... | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
constructor(name, expected, actual) {
super();
Error.captureStackTrace(this, ERR_INVALID_ARG_TYPE);
assert(typeof name === 'string', `'name' must be a string`);
// determiner: 'must be' or 'must not be'
let determiner;
if (typeof expected === 'string' && expected.startsWith('not ')) {
... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
export function esc<T=unknown>(value: T): T|string;
export function transform(input: string, options?: Options & { format?: 'esm' | 'cjs' }): string; | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
const pullVal = (obj, path, val, options = {strict: true}) => {
if (obj === undefined || obj === null || path === undefined) {
return obj;
}
// Clean the path
path = clean(path);
const pathParts = split(path);
const part = pathParts.shift();
if (part === "__proto__") return obj;
if (pathParts.length) {... | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
function PageantSock() {
this.proc = undefined;
this.buffer = null;
} | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function setCachedRendererFunction (id: RendererFunctionId, wc: electron.WebContents, frameId: number, value: CallIntoRenderer) {
// eslint-disable-next-line no-undef
const wr = new WeakRef<CallIntoRenderer>(value);
const mapKey = id[0] + '~' + id[1];
rendererFunctionCache.set(mapKey, wr);
finalizationRegistr... | 0 | TypeScript | CWE-668 | Exposure of Resource to Wrong Sphere | The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource. | https://cwe.mitre.org/data/definitions/668.html | vulnerable |
objectKeys(data).forEach((key) => {
obj.set(key, deserializer(data[key], baseType) as T);
}); | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
export const openExternal = async (url: string, httpsOnly: boolean = false): Promise<void> => {
try {
const urlProtocol = URL.parse(url).protocol || '';
const allowedProtocols = ['https:'];
if (!httpsOnly) {
allowedProtocols.push('ftp:', 'http:', 'mailto:');
}
if (!allowedProtocols.include... | 1 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | safe |
return function genOpenSSLRSAPriv(n, e, d, iqmp, p, q) {
const bn_d = bigIntFromBuffer(d);
const dmp1 = bigIntToBuffer(bn_d % (bigIntFromBuffer(p) - 1n));
const dmq1 = bigIntToBuffer(bn_d % (bigIntFromBuffer(q) - 1n));
return makePEM('RSA PRIVATE',
genRSAASN1Buf(n, e, d, p, q, dmp1,... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function isValidKey(key: string): boolean {
return key !== '__proto__';
} | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
export function escape(value: unknown, is_attr = false) {
const str = String(value);
const pattern = is_attr ? ATTR_REGEX : CONTENT_REGEX;
pattern.lastIndex = 0;
let escaped = '';
let last = 0;
while (pattern.test(str)) {
const i = pattern.lastIndex - 1;
const ch = str[i];
escaped += str.substring... | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
a: () => {
/*_*/
}
},
{ a: source }
);
expect({ a: source }).to.deep.equal(target);
expect(source).to.equal(target.a);
}); | 1 | TypeScript | NVD-CWE-noinfo | null | null | null | safe |
function installRule(markdownIt:any, mdOptions:any, ruleOptions:any, context:any) {
markdownIt.core.ruler.push('sanitize_html', (state:any) => {
const tokens = state.tokens;
const walkHtmlTokens = (tokens:any[]) => {
if (!tokens || !tokens.length) return;
for (const token of tokens) {
if (!['html_block... | 1 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
module.exports = async function(tag) {
if (!tag || ![ 'string', 'number' ].includes(typeof tag)) {
throw new TypeError(`string was expected, instead got ${tag}`);
}
const { message, author, email } = this;
await Promise.all([
exec(`git config user.name "${await author}"`),
exec(`git config user.email "${awa... | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
handler: function ({log} = {}) {
if (!this.server.options.pasv_url) {
return this.reply(502);
}
this.connector = new PassiveConnector(this);
return this.connector.setupServer()
.then((server) => {
let address = this.server.options.pasv_url;
// Allow connecting from local
i... | 1 | TypeScript | CWE-918 | Server-Side Request Forgery (SSRF) | The web server receives a URL or similar request from an upstream component and retrieves the contents of this URL, but it does not sufficiently ensure that the request is being sent to the expected destination. | https://cwe.mitre.org/data/definitions/918.html | safe |
([ key, value ]) => ({ [key]: list.bind(null, value) }),
), | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function foo() {
var_dump(substr_compare("\x00", "\x00\x00\x00\x00\x00\x00\x00\x00", 0, 65535, false));
} | 1 | TypeScript | CWE-125 | Out-of-bounds Read | The software reads data past the end, or before the beginning, of the intended buffer. | https://cwe.mitre.org/data/definitions/125.html | safe |
TEST_F(AsStringGraphTest, LongFill) {
Status s = Init(DT_INT32, /*fill=*/"asdf");
ASSERT_EQ(error::INVALID_ARGUMENT, s.code());
ASSERT_TRUE(absl::StrContains(s.error_message(),
"Fill string must be one or fewer characters"));
} | 1 | TypeScript | CWE-134 | Use of Externally-Controlled Format String | The software uses a function that accepts a format string as an argument, but the format string originates from an external source. | https://cwe.mitre.org/data/definitions/134.html | safe |
constructor(private readonly authService: AuthService) {
super();
} | 1 | TypeScript | CWE-295 | Improper Certificate Validation | The software does not validate, or incorrectly validates, a certificate. | https://cwe.mitre.org/data/definitions/295.html | safe |
type: new GraphQLNonNull(parseGraphQLSchema.viewerType),
async resolve(_source, _args, context, queryInfo) {
try {
return await getUserFromSessionToken(
context,
queryInfo,
'user.',
false
);
} catch (e) {
parseGrap... | 1 | TypeScript | CWE-863 | Incorrect Authorization | The software performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. This allows attackers to bypass intended access restrictions. | https://cwe.mitre.org/data/definitions/863.html | safe |
return `1 ${base} = ${c.amount(d.value, quote)}<em>${day(d.date)}</em>`;
},
});
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
function applyCommandArgs(configuration, argv) {
if (!argv || !argv.length) {
return;
}
argv = argv.slice(2);
const parsedArgv = yargs(argv);
const argvKeys = Object.keys(parsedArgv);
if (!argvKeys.length) {
return;
}
debug("Appling command arguments:", parsedArgv);
c... | 1 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | safe |
private _on_receive_message_chunk(messageChunk: Buffer) {
/* istanbul ignore next */
if (doDebug1) {
const _stream = new BinaryStream(messageChunk);
const messageHeader = readMessageHeader(_stream);
debugLog("CLIENT RECEIVED " + chalk.yellow(JSON.stringify(me... | 0 | TypeScript | CWE-400 | Uncontrolled Resource Consumption | The software does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources. | https://cwe.mitre.org/data/definitions/400.html | vulnerable |
destroy() {
this.end();
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function main() {
try {
let tag = process.env.GITHUB_REF;
if (core.getInput('tag')) {
tag = `refs/tags/${core.getInput('tag')}`;
}
exec(`git for-each-ref --format='%(contents)' ${tag}`, (err, stdout) => {
if (err) {
core.setFailed(err);
} else {
core.setOutput('git-t... | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
newSig.set(s, 4 + 4 + r.length);
return newSig;
}
} | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
static parseChunkToInt(intBytes: Buffer, minByteLen: number, maxByteLen: number, raise_on_Null = false) {
// # Parse data as unsigned-big-endian encoded integer.
// # For empty data different possibilities may occur:
// # minByteLen <= 0 : return 0
// # raise_on_Null == Fal... | 0 | TypeScript | CWE-20 | Improper Input Validation | The product receives input or data, but it does
not validate or incorrectly validates that the input has the
properties that are required to process the data safely and
correctly. | https://cwe.mitre.org/data/definitions/20.html | vulnerable |
Object.keys(data).forEach((key) => {
obj.add(ctx.next(data[key]));
}); | 0 | TypeScript | CWE-915 | Improperly Controlled Modification of Dynamically-Determined Object Attributes | The software receives input from an upstream component that specifies multiple attributes, properties, or fields that are to be initialized or updated in an object, but it does not properly control which attributes can be modified. | https://cwe.mitre.org/data/definitions/915.html | vulnerable |
other_senders_count: Math.max(0, all_senders.length - MAX_AVATAR),
other_sender_names,
muted,
topic_muted,
participated: topic_data.participated,
full_last_msg_date_time: full_datetime,
};
} | 0 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | vulnerable |
export function setupCleanupOnExit(cssPath: string) {
if (!hasSetupCleanupOnExit){
process.on('SIGINT', () => {
console.log('Exiting, running CSS cleanup');
fs.lstat(cssPath, (error: Error, stats: fs.Stats): void => {
if (stats.isDirectory) {
exec(`rm -r ${cssPath}`, function(error)... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
function formatMessage(msg, output) {
var output = output;
output.parseTags = true;
msg = output._parseTags(msg);
output.parseTags = false;
return msg;
} | 0 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | vulnerable |
function genOpenSSLDSAPriv(p, q, g, y, x) {
const asnWriter = new Ber.Writer();
asnWriter.startSequence();
asnWriter.writeInt(0x00, Ber.Integer);
asnWriter.writeBuffer(p, Ber.Integer);
asnWriter.writeBuffer(q, Ber.Integer);
asnWriter.writeBuffer(g, Ber.Integer);
asnWriter.writeBuffer(y, Ber.Inte... | 1 | TypeScript | CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component. | https://cwe.mitre.org/data/definitions/78.html | safe |
const getCdnMarkup = ({ version, cdnUrl = '//cdn.jsdelivr.net/npm', faviconUrl }) => {
const buildCDNUrl = (packageName: string, suffix: string) => filter(`${cdnUrl}/${packageName}/${version ? `@${version}/` : ''}${suffix}` || '')
return `
<link
rel="stylesheet"
href="${buildCDNUrl('graphql-playgr... | 1 | TypeScript | CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | The software does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. | https://cwe.mitre.org/data/definitions/79.html | safe |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.