[Schema Inaccuracy] secret scanning alerts have no required fields
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- openapi, typescript
- Domain
- api
Research direction
Start by locating the secret-scanning-alert schema component and compare its fields with the code-scanning-alert and dependabot_alert components. Use the TypeScript reproduction with secretScanning.getAlert to determine which fields are always returned and which should remain nullable; done means the schema declares the appropriate required fields so those values are no longer typed as possibly undefined.
Written by the indexing model from the issue text.
Description
Schema Inaccuracy
The secret-scanning-alert schema component does not define any required fields, even though some fields are always present (e.g. primary keys). I can't tell on my end what the full list of fields that should be required are, but some obvious ones include:
number- unique ID for the alertcreated_atupdated_aturlhtml_urlstatesecret_typesecret_type_display_namesecretvalidity
Some fields are also marked nullable: true, so it's possible all fields are actually required (e.g. returned in a "GetAlert" response) with some being nullable instead.
For comparison, the code-scanning-alert and dependabot_alert (similar APIs also part of GitHub Advanced Security) have required fields.
Expected
The secret-scanning-alert schema component should define required fields.
Reproduction Steps
import { Octokit } from 'octokit';
const octokit = new Octokit({ auth: 'personal-access-token-here' });
const { data: alert } = await octokit.rest.secretScanning.getAlert({
owner: 'sample-owner',
repo: 'sample-repo',
alert_number: 1234
});
Using TypeScript, review type of fields in alert - they will all include | undefined.
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#165 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100