mirror of
https://github.com/awslabs/iam-policy-autopilot.git
synced 2026-04-26 00:15:57 +03:00
[PR #114] [MERGED] chore: infer lints from workspace and fix errors #243
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/iam-policy-autopilot#243
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/awslabs/iam-policy-autopilot/pull/114
Author: @mschlaipfer
Created: 1/22/2026
Status: ✅ Merged
Merged: 2/3/2026
Merged by: @mschlaipfer
Base:
main← Head:fix-101📝 Commits (10+)
0e471b7fix: infer lints from workspace and fix issues01edd65fix: make clippy lint failures explicit, fix used_unwrapf396fb5fix: allow more lints, fix used-unwrap ones864a441Merge remote-tracking branch 'gh-upstream' into fix-101afa5d45Merge branch 'main' into fix-1015bd29a1Merge branch 'main' into fix-1013457320Merge branch 'main' into fix-1015c14d3fMerge branch 'main' into fix-101cb90337Merge branch 'main' into fix-1010d07856Merge branch 'main' into fix-101📊 Changes
17 files changed (+143 additions, -58 deletions)
View changed files
📝
Cargo.toml(+47 -0)📝
iam-policy-autopilot-access-denied/Cargo.toml(+3 -0)📝
iam-policy-autopilot-access-denied/src/aws/policy_naming.rs(+5 -2)📝
iam-policy-autopilot-access-denied/src/parsing/utils.rs(+2 -1)📝
iam-policy-autopilot-cli/Cargo.toml(+3 -0)📝
iam-policy-autopilot-mcp-server/Cargo.toml(+3 -0)📝
iam-policy-autopilot-mcp-server/src/mcp.rs(+5 -1)📝
iam-policy-autopilot-mcp-server/src/tools/generate_policy.rs(+13 -7)📝
iam-policy-autopilot-mcp-server/src/tools/mod.rs(+21 -12)📝
iam-policy-autopilot-policy-generation/Cargo.toml(+3 -0)📝
iam-policy-autopilot-policy-generation/build.rs(+1 -0)📝
iam-policy-autopilot-policy-generation/src/embedded_data.rs(+1 -0)📝
iam-policy-autopilot-policy-generation/src/enrichment/operation_fas_map.rs(+6 -2)📝
iam-policy-autopilot-policy-generation/src/extraction/engine.rs(+5 -1)📝
iam-policy-autopilot-policy-generation/src/extraction/javascript/scanner.rs(+20 -31)📝
iam-policy-autopilot-tools/Cargo.toml(+3 -0)📝
iam-policy-autopilot-tools/src/lib.rs(+2 -1)📄 Description
Issue #, if available: #101
Description of changes:
The dead code issue in #101 exhibited a deeper issue: we did not infer the workspace lint configuration in the crates. Fixing that (and adding the
dead_code = "deny"setting) exposed the use ofunsafe_codein the MCP server crate used for mocking. I refactored the code to get rid ofunsafeand keep theunsafe_code = "forbid"rather than usingunsafe_code = "deny"and introducing anallow(unsafe_code)override (forbidcannot be overridden).I'd argue that
unsafecode withincfg(test)is okay, but it seems like cargo does not allow to setdenyonly forcfg(test)modules.Inferring linter settings in the crates exposed more issues. I have added explicit allow overrides for all failures and fixed the
unwrap_usedones, sometimes just via changing theunwrapto anexpect. We should step by step fix theseclippywarnings.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.