Direct store API calls in a project's scripts: androidpublisher.googleapis.com, the googleapis androidpublisher client, api.appstoreconnect.apple.com, altool / Transporter in CI files and scripts; scan rule direct-store-api, check and release status warnings with file:line and the storebound command; storebound's own checkout skipped; test, pitfall 97
This commit is contained in:
parent
4f993a906a
commit
4fcee60ba6
7 changed files with 72 additions and 10 deletions
|
|
@ -78,11 +78,19 @@ export async function runScan(dir: string, o: { config?: string } = {}): Promise
|
|||
const traces = findFastlaneTraces(dir);
|
||||
for (const store of ['apple', 'play'] as const) {
|
||||
if (config && !config[store]) continue;
|
||||
const ev = traces.filter(t => t.store === store || t.store === 'both');
|
||||
const ev = traces.filter(t => !t.via && (t.store === store || t.store === 'both'));
|
||||
if (ev.length && !(config?.scan?.ignore ?? []).some(i => i.rule === 'fastlane-upload'))
|
||||
findings.push({ rule: 'fastlane-upload', guideline: 'storebound workflow', store, severity: 'medium', title: `fastlane still in the project (${ev.length} place${ev.length > 1 ? 's' : ''}); uploads there bypass storebound`,
|
||||
evidence: ev.map(t => ({ file: t.file, line: t.line, text: t.text })), fix: FASTLANE_FIX, skill: 'migrate-from-fastlane', ref: 'https://git.crt.fyi/CRT/storebound/src/branch/main/skills/migrate-from-fastlane/SKILL.md' });
|
||||
}
|
||||
// the project's own scripts call a store API or upload tool (pitfall 97)
|
||||
for (const store of ['apple', 'play'] as const) {
|
||||
if (config && !config[store]) continue;
|
||||
const ev = traces.filter(t => t.via === 'api' && t.store === store);
|
||||
if (ev.length && !(config?.scan?.ignore ?? []).some(i => i.rule === 'direct-store-api'))
|
||||
findings.push({ rule: 'direct-store-api', guideline: 'storebound workflow', store, severity: 'medium', title: `scripts call the ${store === 'play' ? 'Google Play' : 'App Store Connect'} API or an upload tool directly (${ev.length} place${ev.length > 1 ? 's' : ''}); they bypass storebound`,
|
||||
evidence: ev.map(t => ({ file: t.file, line: t.line, text: t.text })), fix: ev[0]!.fix!, skill: 'store-api', ref: 'https://git.crt.fyi/CRT/storebound/src/branch/main/skills/store-api/SKILL.md' });
|
||||
}
|
||||
for (const f of findings) {
|
||||
const action = f.accepted ? undefined : scanFixAction(f.rule, { configPath, declarationsChanged: declarations.changed });
|
||||
if (action) f.action = action;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue