hardening: a `forbids` practice whose answer is UNKNOWN falls through to FAIL with empty evidence under --allow-unknown ("runtime safety checks are compiled away: ")
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 42/100
Direção de pesquisa
Start in policy/practices.py around lines 66-71, where an UNKNOWN answer under allow_unknown falls through to the forbids branch and fails with empty found() evidence. Then check questions/practices.py lines 85-90 and the Swift validator in ecosystems/swift.py lines 282-294. Done means a forbids practice with UNKNOWN and no matches passes under --allow-unknown, with a regression test for the repro.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Swift projects whose CI has an unrelated unread reusable workflow (swift-argument-parser, swift-nio, vapor, SwiftLint, dart-lang/http, bloc) get FAIL "Swift's runtime safety checks are compiled away: " with nothing after the colon; grep -rn Ounchecked over each checkout returns nothing. policy/practices.py:70-71: for a forbids practice, UNKNOWN with --allow-unknown should pass on the readable evidence (nothing forbidden found), as drift gets.
Evidence from the corpus audit
dart-lang/http, felangel/bloc / hardening (Swift)
- kind: FALSE_POSITIVE
- actual: FAIL: Swift: Swift's runtime safety checks are compiled away: (nothing after the colon)
- expected: PASS: "release builds keep Swift's runtime safety checks (no -Ounchecked)", as drift gets. No
-OuncheckedorSWIFT_ENFORCE_EXCLUSIVE_ACCESS = offexists in either repo. The practice is aforbidsone; its
answer is "unknown" only because unrelated reusable workflows are unread, and--allow-unknownthen turns
"nothing forbidden found" into a failure with an empty list. - evidence:
grep -rl Ouncheckedover both checkouts: no file;
pkgs/cupertino_http/ios_test/ios/Runner.xcodeproj/project.pbxproj:549:SWIFT_OPTIMIZATION_LEVEL = "-O";;
--answersfor http:{"language": "Swift", "unit": ".", "answer": "unknown", "compilers": [{"compiler": null, "found": {}, "missing": ["-Ounchecked", "unchecked exclusivity"]}], "unknowns": ["job tidy: ... reusable workflow ..."]};
validatorproject_validator/ecosystems/swift.py:283-293:forbids=True,failed="Swift's runtime safety checks are compiled away". - repro: a Swift unit (any
.xcodeproj) + a workflow jobuses: owner/repo/.github/workflows/x.yml@sha; run with
--allow-unknown --only hardening. - confidence: high
apple/swift-argument-parser, apple/swift-nio, vapor/vapor, realm/SwiftLint / hardening
- kind: FALSE_POSITIVE
- actual: FAIL:
Swift: Swift's runtime safety checks are compiled away:(empty evidence after the colon) in all
four.allow.txt; the three projects with no unknowns (Alamofire, TCA, SwiftFormat) PASS the same check. - expected: PASS: no
-Ouncheckedor-enforce-exclusivity=uncheckedexists in any of the four repositories
(grep -rn "Ounchecked\|enforce-exclusivity"over each checkout returns nothing); with--allow-unknownthe
readable evidence shows nothing forbidden. - evidence: project_validator/questions/practices.py:85-90:
in_doubt = met if practice.forbids else not met/
if in_doubt and unknown: return Answer.UNKNOWN; project_validator/policy/practices.py:66-71: the UNKNOWN answer
withallow_unknownfalls through toif practice.forbids: return Result.failed(f"{words.failed}: {joined(answer.found())}", words.hint)
withfound()empty; project_validator/ecosystems/swift.py:282-294 (HARDENING = Practice(... forbids=True ...)).
Strict run confirms the cause: apple__swift-argument-parser.txt[ERROR] hardening: ... Swift: whether Swift's runtime safety checks are kept is unknown. - repro: a
Package.swift(// swift-tools-version:5.9, one target) plus a workflow whose only job is
uses: other/repo/.github/workflows/x.yml@v1; run with--allow-unknown: hardening FAILs with an empty list.
Fix is injudge_settings: for aforbidspractice an UNKNOWN judged permissively must pass. - confidence: high
Found by the regression-corpus audit (235 real repositories, one or more per ecosystem profile; corpus and expected results in corpus/). Evidence is quoted from the audited checkouts at the commits pinned in corpus/projects.toml; <checkouts>/<owner>__<repo> is such a checkout.
🤖 Generated with Claude Code
- Linguagem predominante
- Python
- Estrelas
- 4
- Forks
- 1
- Merge médio
- 10h 41min
- PRs com merge (30d)
- 79
Preparar o ambiente
Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cpp-best-practices/project_validator
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
cpp-best-practices/project_validator#267 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
cpp-best-practices/project_validator#263 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
cpp-best-practices/project_validator#260 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
cpp-best-practices/project_validator#259 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
cpp-best-practices/project_validator#255 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cpp-best-practices/project_validator
Issues semelhantes
-
add entry to blockAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"Talvez já em andamento @0z5a assumiu hoje. Abertaneeds-triage
Dificuldade 2/5 Meio dia Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 2 dias
-
plot_graph crashes when a mesh node has no m2m edgeTalvez já em andamento @tygvi assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
mllam/neural-lam#883 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
future-agi/future-agi#4092 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
transcript analytics: a text whose only protected spans the prose pass redacts is withheld wholeAberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
WingedGuardian/GENesis-AGI#4641 ·
Mantenedores costumam responder em até 1 dia