knuckleswtf / knuckleswtf/scribe

Unexpected Behaviour: Using Database Values for Example Responses

Open
#980 3 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
PHP
Stars
2.3k
Forks
357
PR merge metrics
No merged PRs in 30d

Description

### Scribe version

4.40.0

### PHP version

PHP 8.3.19

### Laravel version

v11.44.0

### Scribe config

```ruby
title => "Partner.io - API"
base_url => "http://api.partner.local:8000"
type => "laravel"
static.output_path => "public/v1/docs"
laravel.add_routes => false
laravel.docs_url => "/v1/docs"
laravel.middleware.0 => "docs"
try_it_out.use_csrf => true
auth.enabled => true
auth.default => true
auth.name => "Api-Key"
examples.models_source => removed databaseFirst
```

### What happened?

The generated documentation, uses the first database record, for example responses, this in production documentation, would leak customer data.

### Docs

- [x] I've checked [the docs](https://scribe.knuckles.wtf/laravel), the [troubleshooting guide](https://scribe.knuckles.wtf/laravel/troubleshooting), and [existing issues](https://github.com/knuckleswtf/scribe/issues?q=is%3Aissue+), but I didn't find a solution

Contributor guide

Open the contributing guide

Research direction

Start by reproducing generation with the shown Scribe configuration, focusing on the examples.models_source setting and the Laravel example-generation path. Confirm that generated responses no longer include records from the production database, and add or run a regression check if the project provides one.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
documentation, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.