Skip to content

Conversation

@keyurdoshi03
Copy link
Collaborator

@keyurdoshi03 keyurdoshi03 commented Aug 9, 2025

Description

  • Implemented LFI vulnerability where only double url-encoded with nested traversal works
    So, to access path like "../file.py", the parameter that needs to be passed is "%252E%252E%252E%252F%252E%252Ffile.py", which translates to "..././file.py"
    [More safeguards can be added to make LFI even more difficult]

  • Added verbose error messages to help understand what kind of path will bypass checks

  • Added download service report functionality where this vulnerability is injected

  • Limited file storage to 50 pdfs (configurable) to avoid filling the disk space

Testing

Local testing

Documentation

Make sure that you have documented corresponding changes in this repository.

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged
  • I have documented any changes if required in the docs.

@github-actions
Copy link

github-actions bot commented Aug 9, 2025

Test Results

93 tests  ±0   93 ✅ ±0   2s ⏱️ ±0s
17 suites ±0    0 💤 ±0 
 7 files   ±0    0 ❌ ±0 

Results for commit 0e4a624. ± Comparison against base commit 1bbcd3c.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 9, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
1363 1090 80% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
services/workshop/crapi/mechanic/urls.py 100% 🟢
services/workshop/crapi/mechanic/views.py 76% 🟢
services/workshop/crapi_site/settings.py 85% 🟢
TOTAL 87% 🟢

updated for commit: 0e4a624 by action🐍

piyushroshan
piyushroshan previously approved these changes Aug 28, 2025
@piyushroshan piyushroshan merged commit 3fa3729 into develop Sep 3, 2025
10 checks passed
@piyushroshan piyushroshan deleted the lfi-vuln branch September 3, 2025 13:43
piyushroshan added a commit that referenced this pull request Sep 22, 2025
* Support disabling wait-for

* Init handling workshop service

* Dependency handling community service

* Lint

* Handle health

* Bump k8s-wait-for to v2.0 for arm64 (#256)

* Bump k8s-wait-for to v2.0 for arm64

* Update certs

* Update README.md (#257)

* Correct training

* Timeout handling for gateway (#259)

Timeout handling for gateway

* Update pr-build.yml

* Make vin numbers to be VIN regex complaint  (#261)

* Fix VIN

* add permissions pull request write

---------

Co-authored-by: Roshan Piyush <piyush.roshan@gmail.com>

* Make storage provisions configurable.  (#263)

Persistent volume helm configuration

* Escaped validation for unsigned JWTs (#265)

* added check for unsigned jwt

* Change to typescript from js and show service request history (#269)

* Use typescript

* Fix bugs

* lint

* Convert more to typescript

* More typescript

* User service req view

* Update dockerfile

* Implement service history

* Update docker-compose.yml

* Implement report view (#270)

* Update pr-build.yml

* Change phone number feature (#268)

* Added functionality to send otp for phone number change request


---------

Co-authored-by: Roshan Piyush <piyush.roshan@gmail.com>

* Phone number change web service (#271)


* web service verify OTP impl

* minor identity service changes

---------

Co-authored-by: Roshan Piyush <piyush.roshan@gmail.com>

* Mechanic ux (#281)

* E2E-UI
* Mechanic UX fixes
* Fix profile pages

* Update web and identity images (#282)

* Fix convention

* Enhanced README to Pull and Modify Variables in the .env file (#288)

* enhanced readme

* enhanced setup.md

* enhanced setup.md

* Update LICENSE.md

* Update README.md

* Update setup.md

* Fix health of gateway image (#289)

* Fix health of gateway image
* Update docker compose

* Fix filename typos in README.md (#290)

The current name of the docker compose file is `docker-compose.yml`. The readme command examples indicated that the name was `docker compose.yml`. This commit updates all README cases of this error to reflect the actual name of the file, making the command functional again.

* Update values-pv.yaml

* Chatbot impl (#295)

* Implement chatbot UI

* added llm chatbot service (#242)

* added llm chatbot service

* Llm chatbot (#243)

* removed unused imports

* Integration

* Lint

* Minor fixes

* Fix ssl issue

* Fix docker

* Fix entrypoint

* increase timeout

* Implement helm

* Fix entrypoint

* Store user state for chatbot

* resolved segmentation fault error in chatbot (#245)

* Add release workflow

* Instructions

* Fix tag publish

* Strip tag prefix

* String tag prefix for docker tags

* Fix entrypoint.sh

* Session based chat

* Fix UI

* Lint

* Fix configmap

* Update requirements

* Fix dockerfile

* Fix UX

* Seperate prompts

* Change to ChatOpenAI

* Change to ChatOpenAI

* Return messages

* Save chat history

* Cleanup

* Cleanup

* Preserve X-Forwarded-For

* Add mongo dependency for chatbot

* Use old turbo model

* FSession logs not clearer debug

* Add ssn

* Fix gateway service health

* Chatbot typescript

* Upgrade packages

* Dummy commit

* Lint

* lint

* Reduce max mem

* Update chatbot

* Update chatbot

* Potential fix for code scanning alert no. 21: Flask app is run in debug mode

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Chatbot mcp impl

* spotless

* Fix chatbot

* Spotless

* Fix usage

* MCP server fix (#303)

* Remove errors

* Remove variables not needed

* Add management scripts

* Make executable

* Fix config

* Fix config

* Add init for chatbot

* Add retry for apikey

* Add retry for apikey

* Chatbot UX fix

* update tool versions

* Lint fix

* Upgrade golangci-lint

* Npm lint fix

---------

Co-authored-by: Dhruv Singhal <dhruv.singhal@traceable.ai>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: keyurdoshi03 <keyur.doshi@harness.io>

* Update Chart.yaml

* Update VERSION - Correct value (#305)

Align VERSION file with release info.

* Chatbot markdown (#308)


* Bot support markdown in chat

* Model selection implemented (#309)

* Model selection implemented

* Refactor: moved default model env variable to correct files

* User context provided (#310)

* Model selection implemented

* Refactor: moved default model env variable to correct files

* User context provided

* Create challenges.md

* Update challenges

* Update challenges

* lint

* Implemented vector index and MCP tool for semantic search (#311)

* Implemented vector index for chat history context and MCP tool for semantic search & summarization

* Persisted storage of vectors using Chroma

* JWT auth added for MCP server's api calls (#314)

* JWT auth added for MCP server's api calls

* Uxrevamp (#316)

* Chroma fixes (#317)

* Fix mcpserver

* fix chatbot

* Fix async calls

* black

* Http client fix

* Fix async

* Fix async

* Upgrade chromadb

* Fixes

* Fix css of remaining components

* Interaction fix

* chat fix (#318)

* chat fix

* prettier formatting

* LFI vuln (v1) (#319)

* LFI vuln (v1)

* Change log level for API key retrieval success

* helm fixes (#320)

* helm fixes

* resolved comments

---------

Co-authored-by: Namburi Soujanya <54130357+soujanyanmbri@users.noreply.github.com>
Co-authored-by: Mathew Jose Mammoottil <60283272+mathew-jose@users.noreply.github.com>
Co-authored-by: Pushkar Pawar <77621010+pushkarpawar15@users.noreply.github.com>
Co-authored-by: massey-n <136398242+massey-n@users.noreply.github.com>
Co-authored-by: Dhruv Singhal <dhruv.singhal@traceable.ai>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: keyurdoshi03 <keyur.doshi@harness.io>
Co-authored-by: Rick M <kingthorin@users.noreply.github.com>
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.

3 participants