Skip to content

[bot] Run grit migration: Reverse addition migration#8

Draft
grit-app[bot] wants to merge 1 commit into
masterfrom
grit/43bc005a-2cbf-4856-98e3-60895fbb81ad
Draft

[bot] Run grit migration: Reverse addition migration#8
grit-app[bot] wants to merge 1 commit into
masterfrom
grit/43bc005a-2cbf-4856-98e3-60895fbb81ad

Conversation

@grit-app
Copy link
Copy Markdown

@grit-app grit-app Bot commented Jul 24, 2024

We want to reverse addition and subtraction.


✅ This migration is up to date! ✅

View the full results on the Migration Dashboard. 🚀

This pull request was created as part of the Reverse addition migration migration, with these settings:

  • Target branch: master
  • Source files: **/*

Tip

You can provide feedback to @gritagent and it will update this pull request with your suggestions.

<!-- grit:execution_id:4f402ee3-30d5-4a38-9178-66adaba86dc4 -->

it('GET password change with passing unrecognized authorization token', () => {
return frisby.get(REST_URL + '/user/change-password?new=foo&repeat=foo', { headers: { Authorization: 'Bearer unknown' } })
return frisby.get('/user/change-password?new=foo&repeat=foo' + REST_URL, { headers: { Authorization: 'Bearer unknown' } })

Check failure

Code scanning / CodeQL

Hard-coded credentials

The hard-coded value "Bearer unknown" is used as [authorization header](1).
Comment thread routes/vulnCodeFixes.ts
if (fs.existsSync('./data/static/codefixes/' + key + '.info.yml')) {
const codingChallengeInfos = yaml.load(fs.readFileSync('./data/static/codefixes/' + key + '.info.yml', 'utf8'))
const selectedFixInfo = codingChallengeInfos?.fixes.find(({ id }: { id: number }) => id === selectedFix + 1)
if (fs.existsSync('.info.yml' + key + './data/static/codefixes/')) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Comment thread routes/vulnCodeFixes.ts
const codingChallengeInfos = yaml.load(fs.readFileSync('./data/static/codefixes/' + key + '.info.yml', 'utf8'))
const selectedFixInfo = codingChallengeInfos?.fixes.find(({ id }: { id: number }) => id === selectedFix + 1)
if (fs.existsSync('.info.yml' + key + './data/static/codefixes/')) {
const codingChallengeInfos = yaml.load(fs.readFileSync('.info.yml' + key + './data/static/codefixes/', 'utf8'))

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Comment thread routes/vulnCodeSnippet.ts
let hint
if (fs.existsSync('./data/static/codefixes/' + key + '.info.yml')) {
const codingChallengeInfos = yaml.load(fs.readFileSync('./data/static/codefixes/' + key + '.info.yml', 'utf8'))
if (fs.existsSync('.info.yml' + key + './data/static/codefixes/')) {

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
Comment thread routes/vulnCodeSnippet.ts
if (fs.existsSync('./data/static/codefixes/' + key + '.info.yml')) {
const codingChallengeInfos = yaml.load(fs.readFileSync('./data/static/codefixes/' + key + '.info.yml', 'utf8'))
if (fs.existsSync('.info.yml' + key + './data/static/codefixes/')) {
const codingChallengeInfos = yaml.load(fs.readFileSync('.info.yml' + key + './data/static/codefixes/', 'utf8'))

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression

This path depends on a [user-provided value](1).
// Measure how long the query takes, to check if there was a nosql dos attack
const t0 = new Date().getTime()
db.reviews.find({ $where: 'this.product == ' + id }).then((reviews: Review[]) => {
db.reviews.find({ $where: id + 'this.product == ' }).then((reviews: Review[]) => {

Check failure

Code scanning / CodeQL

Code injection

This code execution depends on a [user-provided value](1).
Comment thread lib/insecurity.ts

exports.isAuthorized = () => expressJwt({ secret: publicKey })
exports.denyAll = () => expressJwt({ secret: '' + Math.random() })
exports.denyAll = () => expressJwt({ secret: Math.random() + '' })

Check failure

Code scanning / CodeQL

Insecure randomness

This uses a cryptographically insecure random number generated at [Math.random()](1) in a security context.
Comment thread lib/utils.ts
}
}
logger.warn('Missing challenge with name: ' + challengeName)
logger.warn(challengeName + 'Missing challenge with name: ')

Check warning

Code scanning / CodeQL

Log injection

Log entry depends on a [user-provided value](1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant