Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions - #5

Merged
Sun Haoran (haoranpb) merged 1 commit into
mainfrom
alert-autofix-2
Sep 30, 2025
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#5
Sun Haoran (haoranpb) merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@haoranpb

Copy link
Copy Markdown
Collaborator

Potential fix for https://github.com/microsoft/BC-Bench/security/code-scanning/2

How to fix the problem:
Explicitly add a permissions block to the workflow to limit the GITHUB_TOKEN permissions to the minimum required. Since the jobs only need to read the repository contents (to checkout code and read secrets), the block should set contents: read. This block can be added at the workflow level (to apply to all jobs), or per-job if differing permissions are needed. In this case, workflow-level (top-level) makes sense.

Detailed steps:

  • Edit .github/workflows/dataset-validation.yml.
  • Add a permissions: block after the name: line and before the on: block.
  • Set contents: read (which is a minimal, safe default).
  • No further changes or imports are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@haoranpb
Sun Haoran (haoranpb) marked this pull request as ready for review September 30, 2025 13:02
@haoranpb
Sun Haoran (haoranpb) merged commit ac62668 into main Sep 30, 2025
5 checks passed
@haoranpb
Sun Haoran (haoranpb) deleted the alert-autofix-2 branch September 30, 2025 13:02
Wenjie Fan (gggdttt) pushed a commit that referenced this pull request Jul 1, 2026
- privacy-012: reword #1/#3/#5 - code uses direct Error(Label,args), not StrSubstNo; keep the valid PII-to-telemetry finding, drop the false StrSubstNo premise
- style-011: drop 3 comments redundant with accurate AA0005 duplicates / no-rule indentation (20->17)
- style-013: keep all + add missing real hardcoded-string findings incl. previously-unreviewed CustStPDFDocHandler (11->18); fix wrong quotes/lines
- upgrade-006: drop 2 false positives claiming no delegation where code does delegate (9->7)
- strip dangling '- See agent comment for details.' suffix from 89 comments (13 entries)
Marko Aleksandric (AleksandricMarko) added a commit that referenced this pull request Jul 31, 2026
…ding

Applies Haoran's review feedback for the extensibility-request categories:

- Rename to explicit `extensibility-request-implement` / `extensibility-request-triage`
  across category ids, enum members, classes, dataset files and module files (#1/#2/#4).
- Slim both prompt templates to reflect real-world usage; category-specific rules now
  live in the ai-ext-fix / argus-triage skills (#3).
- Merge duplicate `bcbench.results` import in commands/evaluate.py (#5).
- Uptake #761: both ext entries subclass `RepoGroundedEntry` (#6/#7).
- Triage `patch` defaults to None; stripped from the dataset (#8).
- Constrain triage label fields with a `ManagedLabel` Literal to catch dataset typos (#9).
- Move the ext dataset classes into dataset/extensibility_request.py, like code review (#10).
- Drop `fetch_commit_if_missing` from both ext pipelines to match the other pipelines (#11).
- Keep ext-implement judge-only for now; container build/publish noted as future work (#12).
- Grade triage with the NL2AL LMChecklist instead of the code-review-style hybrid:
  `ExtRequestTriageResult` removed in favour of `JudgeBasedEvaluationResult`, expected_*
  fields replaced by an `expected` checklist, evaluators `lm_checklist`, core score
  `test_passed`; 17 triage entries migrated (#13/#14/#15/#16).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fb712366-b026-470c-9d09-1bd9e9f52a31
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.

1 participant