Skip to content

Commit 27e7559

Browse files
committed
fix: solve remaining linter issues
1 parent feecbb8 commit 27e7559

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.pentest/scripts/07_param_fuzzing.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ ROLE_PAYLOADS=(
255255
"[]" # array literal
256256
"a" # very short
257257
"$(cat /etc/passwd)" # shell injection
258-
# shellcheck disable=SC2006
259-
"`id`" # backtick command injection
258+
'`id`' # backtick command injection payload (literal string)
260259
"%00" # null byte
261260
"../../etc/passwd" # path traversal
262261
"x" * 5000 # long string (via python below)

.pentest/scripts/11_search_injection.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,11 +252,11 @@ echo "${BODY:0:200}" | tee -a "$OUTFILE"
252252
# ---------------------------------------------------------------------------
253253
section "9. Error Message / Config Leakage in Search Errors"
254254

255+
MONGO_GT='{"$gt": ""}' # MongoDB-style injection payload — $ must not expand
255256
TRIGGER_PAYLOADS=(
256257
"__proto__[admin]=true"
257258
"constructor.prototype.admin=true"
258-
# shellcheck disable=SC2016
259-
'{"$gt": ""}'
259+
"$MONGO_GT"
260260
"'; WAITFOR DELAY '0:0:5'--"
261261
)
262262

.pentest/test-sqli-advanced.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fail() { echo -e "${RED}[FAIL]${RESET} $*"; FAILED=$(( FAILED + 1 )); }
5454
warn() { echo -e "${YELLOW}[WARN]${RESET} $*"; WARNINGS=$(( WARNINGS + 1 )); }
5555
info() { echo -e "${CYAN}[*]${RESET} $*"; }
5656
header() { echo -e "\n${BOLD}${CYAN}=== $* ===${RESET}\n"; }
57-
verbose() { [ "${VERBOSE}" -eq 1 ] && echo " $*" || true; }
57+
verbose() { if [ "${VERBOSE}" -eq 1 ]; then echo " $*"; fi; }
5858

5959
# ---------------------------------------------------------------------------
6060
# Auth
@@ -239,7 +239,7 @@ test_union_based() {
239239
sleep 0.1
240240
done
241241

242-
[ "${found_vuln}" -eq 0 ] && info "UNION-based: no injection point confirmed" || true
242+
if [ "${found_vuln}" -eq 0 ]; then info "UNION-based: no injection point confirmed"; fi
243243
}
244244

245245
# ===========================================================================
@@ -302,7 +302,7 @@ test_error_based() {
302302
sleep 0.1
303303
done
304304

305-
[ "${found_vuln}" -eq 0 ] && info "Error-based: no schema/data leakage detected" || true
305+
if [ "${found_vuln}" -eq 0 ]; then info "Error-based: no schema/data leakage detected"; fi
306306
}
307307

308308
# ===========================================================================
@@ -387,7 +387,7 @@ test_boolean_based() {
387387
sleep 0.1
388388
done
389389

390-
[ "${found_vuln}" -eq 0 ] && info "Boolean-based: responses are indistinguishable (no injection point)" || true
390+
if [ "${found_vuln}" -eq 0 ]; then info "Boolean-based: responses are indistinguishable (no injection point)"; fi
391391
}
392392

393393
# ===========================================================================
@@ -546,7 +546,7 @@ test_time_based() {
546546
sleep 0.2
547547
done
548548

549-
[ "${found_vuln}" -eq 0 ] && info "Time-based: no timing anomaly detected (pg_sleep not injected)" || true
549+
if [ "${found_vuln}" -eq 0 ]; then info "Time-based: no timing anomaly detected (pg_sleep not injected)"; fi
550550
}
551551

552552
# ===========================================================================

app/modules/matchmaking/controllers/scrim_requests_controller.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ def cancel
149149
private
150150

151151
def set_request
152-
# Scoped to the current org via for_organization — only the org's own requests are accessible.
152+
# Already org-scoped via for_organization — false positive.
153+
# nosemgrep: ruby.rails.security.brakeman.check-unscoped-find.check-unscoped-find
153154
@scrim_request = ScrimRequest.for_organization(current_organization.id).find(params[:id])
154155
rescue ActiveRecord::RecordNotFound
155156
render_not_found

load_tests/config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// k6 Load Test Configuration
22
// Centralized configuration for all load tests
3+
/* global __ENV */
34

45
export const config = {
56
// Base URL - change based on environment

0 commit comments

Comments
 (0)