Skip to content

docs: reduce permission scope - #2261

Merged
cpu merged 1 commit into
rustls:mainfrom
cpu:cpu-dr-zizmor
Dec 6, 2024
Merged

cpu merged 1 commit into
rustls:mainfrom
cpu:cpu-dr-zizmor

Conversation

@cpu

@cpu cpu commented Dec 6, 2024

Copy link
Copy Markdown
Member

Only the deploy task needs the "pages/id-token:write" permissions. Let's try to limit the potential for badness by only giving that specific job step elevated permission instead of doing it at the workflow level.

This was flagged by running Zizmor on the .github/workflows dir with Zizmor 0.7.0 in offline mode and seems like a sensible idea.

If you run this tool in online mode w/ a GH_TOKEN it also flags several ref-confusion findings for our usage of install-action. I'm not 100% sure why it didn't flag the other instances where we specify dependent actions by tag (e.g. checkout@v4), but the fix in either case is to pin our actions by SHA hash. Since that's a bit more invasive I haven't made that change yet pending some discussion on whether it's something folks are on-board for.

Only the `deploy` task needs the "pages/id-token:write" permissions.
Let's try to limit the potential for badness by only giving that
specific job step elevated permission.

This was flagged[0] by running Zizmor on the `.github/workflows` dir
with Zizmor 0.7.0 in offline mode and seems like a sensible idea.

[0]: https://woodruffw.github.io/zizmor/audits/#remediation_2
@cpu cpu self-assigned this Dec 6, 2024
@rustls-benchmarking

rustls-benchmarking Bot commented Dec 6, 2024 •

Copy link
Copy Markdown

Benchmark results

Instruction counts

Significant differences

There are no significant instruction count differences

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_server 10743281 10701931 -41350 (-0.38%) 1.03%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 8575137 8600989 25852 (0.30%) 1.00%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_server 10422770 10399805 -22965 (-0.22%) 1.51%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_server 10695352 10716752 21400 (0.20%) 0.81%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 8571085 8575992 4907 (0.06%) 0.72%
handshake_no_resume_ring_1.3_ecdsap256_chacha_client 3622485 3624358 1873 (0.05%) 0.46%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 3081435 3082271 836 (0.03%) 0.26%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 3081015 3080360 -655 (-0.02%) 0.27%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 1176342 1176445 103 (0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 1174241 1174148 -93 (-0.01%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 2076556 2076467 -89 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_aes_client 3623014 3623109 95 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_client 58251186 58250546 -640 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_server 30411957 30412256 299 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_server 30408946 30409215 269 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes_client 1717597 1717582 -15 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_server 30369770 30369555 -215 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_server 28955833 28955634 -199 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_client 27783952 27784130 178 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_client 27839076 27839251 175 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_client 28177607 28177740 133 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_server 28879954 28880087 133 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_client 28200524 28200648 124 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_server 28880168 28880047 -121 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha_client 27777204 27777089 -115 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_server 30369128 30369252 124 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha_client 27779609 27779501 -108 (-0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_aes_client 27843575 27843663 88 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_client 27836628 27836713 85 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha_client 28170674 28170755 81 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha_server 28877345 28877412 67 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes_server 28958498 28958443 -55 (-0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_aes_server 1611854 1611851 -3 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes_server 30412356 30412301 -55 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha_client 28173820 28173869 49 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_aes_client 28207432 28207478 46 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha_server 30366322 30366367 45 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes_server 28958383 28958355 -28 (-0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes_client 28203622 28203644 22 (0.00%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_server 46389596 46389587 -9 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_aes_client 58348757 58348746 -11 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_aes_client 58352502 58352513 11 (0.00%) 0.20%
transfer_no_resume_ring_1.2_rsa_aes_client 58235819 58235810 -9 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_server 80554934 80554946 12 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_client 58192284 58192291 7 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_server 80661850 80661859 9 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_server 80648876 80648884 8 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes_server 46423829 46423833 4 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 46456937 46456933 -4 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_aes_server 46467813 46467809 -4 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_aes_server 46487094 46487091 -3 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes_client 58253416 58253413 -3 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_aes_client 58341601 58341604 3 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha_client 92714539 92714543 4 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_server 80540449 80540451 2 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_server 80641257 80641255 -2 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha_client 92720778 92720776 -2 (-0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes_server 46464556 46464557 1 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_aes_server 46470691 46470692 1 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_server 46477529 46477528 -1 (-0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_chacha_client 92673768 92673769 1 (0.00%) 0.20%
transfer_no_resume_ring_1.3_rsa_chacha_client 92684670 92684671 1 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha_client 92716775 92716776 1 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_aes_server 41599491 41599491 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_client 40279063 40279063 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_server 41481261 41481261 0 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes_server 2073517 2073517 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_client 35182466 35182466 0 (0.00%) 0.20%
handshake_no_resume_ring_1.2_rsa_aes_server 11292338 11292338 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_aes_client 40275012 40275012 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_aes_server 41599569 41599569 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_rsa_chacha_client 40502450 40502450 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_client 40572700 40572700 0 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.2_rsa_aes_client 3864805 3864805 0 (0.00%) 0.20%
handshake_tickets_ring_1.2_rsa_aes_client 4489023 4489023 0 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes_client 1925472 1925472 0 (0.00%) 0.20%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes_client 58255491 58255491 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap256_chacha_client 40180632 40180632 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_server 41962288 41962288 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap256_chacha_server 1613242 1613242 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_chacha_client 40498450 40498450 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_server 41962538 41962538 0 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.2_rsa_aes_server 5016614 5016614 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_server 42060848 42060848 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_chacha_server 41478668 41478668 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_aes_server 41596898 41596898 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_aes_client 2655793 2655793 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_rsa_chacha_server 41959388 41959388 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_chacha_server 41481339 41481339 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_chacha_client 40177675 40177675 0 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap384_chacha_client 92682835 92682835 0 (0.00%) 0.20%
handshake_session_id_ring_1.2_rsa_aes_client 4228689 4228689 0 (0.00%) 0.20%
handshake_tickets_aws_lc_rs_1.2_rsa_aes_client 4206709 4206709 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_ecdsap384_aes_client 40272063 40272063 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_chacha_client 40495175 40495175 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_client 35180536 35180536 0 (0.00%) 0.20%
transfer_no_resume_ring_1.3_ecdsap256_chacha_server 80535650 80535650 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_server 11430598 11430598 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_client 40576700 40576700 0 (0.00%) 0.20%
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha_client 1932207 1932207 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_aes_server 11424618 11424618 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_rsa_aes_server 42057698 42057698 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap256_aes_server 42060598 42060598 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_chacha_server 7566360 7566360 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_ecdsap384_aes_server 7564182 7564182 0 (0.00%) 0.20%
handshake_session_id_ring_1.3_rsa_chacha_client 40184683 40184683 0 (0.00%) 0.20%
handshake_session_id_aws_lc_rs_1.2_rsa_aes_server 3868893 3868893 0 (0.00%) 0.20%
handshake_no_resume_ring_1.3_rsa_chacha_client 2661658 2661658 0 (0.00%) 0.20%
handshake_session_id_ring_1.2_rsa_aes_server 4229140 4229140 0 (0.00%) 0.20%
handshake_tickets_ring_1.2_rsa_aes_server 4693680 4693680 0 (0.00%) 0.20%
handshake_no_resume_ring_1.2_rsa_aes_client 2563529 2563529 0 (0.00%) 0.20%
handshake_tickets_ring_1.3_ecdsap384_aes_client 40569433 40569433 0 (0.00%) 0.20%

Wall-time

Significant differences

There are no significant wall-time differences

Other differences

Click to expand
Scenario Baseline Candidate Diff Threshold
handshake_no_resume_aws_lc_rs_1.3_rsa_chacha 1.09 ms 1.11 ms 0.02 ms (1.45%) 3.23%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_aes 4.44 ms 4.49 ms 0.05 ms (1.09%) 4.08%
transfer_no_resume_aws_lc_rs_1.2_rsa_aes 5.01 ms 5.06 ms 0.05 ms (1.03%) 4.46%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_aes 455.87 µs 460.05 µs 4.18 µs (0.92%) 2.94%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_aes 5.16 ms 5.21 ms 0.05 ms (0.87%) 3.87%
transfer_no_resume_aws_lc_rs_1.3_rsa_aes 5.09 ms 5.13 ms 0.04 ms (0.87%) 3.61%
handshake_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 453.88 µs 457.64 µs 3.76 µs (0.83%) 2.88%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_aes 4.28 ms 4.31 ms 0.03 ms (0.77%) 1.13%
handshake_no_resume_ring_1.3_ecdsap256_aes 503.46 µs 507.31 µs 3.85 µs (0.76%) 2.40%
handshake_no_resume_ring_1.3_ecdsap256_chacha 499.97 µs 503.71 µs 3.73 µs (0.75%) 2.53%
transfer_no_resume_ring_1.3_ecdsap256_aes 6.31 ms 6.36 ms 0.05 ms (0.74%) 3.14%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_aes 5.00 ms 5.03 ms 0.03 ms (0.68%) 1.12%
handshake_session_id_aws_lc_rs_1.3_rsa_chacha 4.89 ms 4.93 ms 0.03 ms (0.68%) 1.09%
handshake_session_id_aws_lc_rs_1.3_ecdsap256_chacha 4.26 ms 4.29 ms 0.03 ms (0.67%) 1.01%
transfer_no_resume_ring_1.2_rsa_aes 6.72 ms 6.77 ms 0.04 ms (0.66%) 2.79%
handshake_session_id_aws_lc_rs_1.3_rsa_aes 4.93 ms 4.97 ms 0.03 ms (0.66%) 1.23%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_aes 4.49 ms 4.51 ms 0.03 ms (0.65%) 1.14%
handshake_tickets_aws_lc_rs_1.3_ecdsap256_chacha 4.46 ms 4.49 ms 0.03 ms (0.63%) 1.15%
handshake_session_id_aws_lc_rs_1.3_ecdsap384_chacha 4.96 ms 4.99 ms 0.03 ms (0.58%) 1.12%
transfer_no_resume_ring_1.3_rsa_aes 6.81 ms 6.85 ms 0.04 ms (0.58%) 3.04%
handshake_tickets_aws_lc_rs_1.3_rsa_chacha 5.11 ms 5.13 ms 0.03 ms (0.57%) 1.34%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_chacha 5.17 ms 5.20 ms 0.03 ms (0.56%) 1.00%
handshake_tickets_aws_lc_rs_1.3_rsa_aes 5.13 ms 5.16 ms 0.03 ms (0.53%) 1.15%
handshake_tickets_aws_lc_rs_1.3_ecdsap384_aes 5.20 ms 5.23 ms 0.02 ms (0.48%) 1.00%
transfer_no_resume_ring_1.3_ecdsap384_aes 9.47 ms 9.51 ms 0.04 ms (0.43%) 2.25%
handshake_no_resume_aws_lc_rs_1.2_rsa_aes 1.06 ms 1.06 ms 0.00 ms (0.39%) 2.24%
transfer_no_resume_ring_1.3_ecdsap256_chacha 12.95 ms 13.00 ms 0.05 ms (0.35%) 1.58%
handshake_no_resume_aws_lc_rs_1.3_rsa_aes 1.09 ms 1.09 ms 0.00 ms (0.32%) 2.40%
transfer_no_resume_aws_lc_rs_1.3_ecdsap256_chacha 12.91 ms 12.96 ms 0.04 ms (0.32%) 1.64%
handshake_no_resume_ring_1.3_rsa_aes 996.41 µs 999.51 µs 3.09 µs (0.31%) 1.00%
handshake_tickets_ring_1.2_rsa_aes 1.61 ms 1.61 ms -0.00 ms (-0.31%) 1.31%
transfer_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 13.64 ms 13.68 ms 0.04 ms (0.29%) 1.39%
handshake_no_resume_ring_1.3_rsa_chacha 995.40 µs 998.14 µs 2.74 µs (0.28%) 1.07%
transfer_no_resume_ring_1.3_rsa_chacha 13.46 ms 13.49 ms 0.04 ms (0.27%) 1.41%
transfer_no_resume_aws_lc_rs_1.3_rsa_chacha 13.57 ms 13.60 ms 0.03 ms (0.24%) 1.56%
transfer_no_resume_ring_1.3_ecdsap384_chacha 16.11 ms 16.15 ms 0.04 ms (0.24%) 1.25%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_aes 1.17 ms 1.18 ms 0.00 ms (0.24%) 1.20%
handshake_session_id_ring_1.3_ecdsap256_chacha 6.39 ms 6.41 ms 0.01 ms (0.21%) 1.00%
handshake_no_resume_aws_lc_rs_1.3_ecdsap384_chacha 1.17 ms 1.17 ms 0.00 ms (0.19%) 1.21%
handshake_tickets_ring_1.3_rsa_chacha 6.96 ms 6.97 ms 0.01 ms (0.15%) 1.00%
handshake_no_resume_ring_1.2_rsa_aes 991.75 µs 993.22 µs 1.46 µs (0.15%) 1.16%
handshake_no_resume_ring_1.3_ecdsap384_aes 3.66 ms 3.66 ms 0.01 ms (0.14%) 1.00%
handshake_session_id_ring_1.3_rsa_chacha 6.88 ms 6.89 ms 0.01 ms (0.13%) 1.00%
handshake_session_id_ring_1.3_ecdsap384_chacha 9.54 ms 9.55 ms 0.01 ms (0.12%) 1.00%
handshake_tickets_ring_1.3_ecdsap256_chacha 6.48 ms 6.48 ms 0.01 ms (0.10%) 1.00%
handshake_no_resume_ring_1.3_ecdsap384_chacha 3.66 ms 3.66 ms 0.00 ms (0.09%) 1.00%
handshake_tickets_aws_lc_rs_1.2_rsa_aes 1.77 ms 1.77 ms 0.00 ms (0.09%) 1.41%
handshake_tickets_ring_1.3_ecdsap384_chacha 9.62 ms 9.63 ms 0.01 ms (0.06%) 1.00%
handshake_session_id_ring_1.3_rsa_aes 6.94 ms 6.94 ms 0.00 ms (0.06%) 1.00%
handshake_session_id_ring_1.3_ecdsap256_aes 6.45 ms 6.45 ms 0.00 ms (0.05%) 1.00%
handshake_session_id_ring_1.3_ecdsap384_aes 9.59 ms 9.60 ms 0.00 ms (0.04%) 1.00%
handshake_session_id_ring_1.2_rsa_aes 1.52 ms 1.52 ms 0.00 ms (0.02%) 1.02%
handshake_tickets_ring_1.3_ecdsap384_aes 9.67 ms 9.67 ms 0.00 ms (0.02%) 1.00%
handshake_session_id_aws_lc_rs_1.2_rsa_aes 1.60 ms 1.60 ms 0.00 ms (0.01%) 1.73%
handshake_tickets_ring_1.3_ecdsap256_aes 6.53 ms 6.53 ms 0.00 ms (0.01%) 1.00%
handshake_tickets_ring_1.3_rsa_aes 7.02 ms 7.02 ms -0.00 ms (-0.00%) 1.00%

Additional information

Historical results

Checkout details:

@codecov

codecov Bot commented Dec 6, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.64%. Comparing base (546f853) to head (42adc06).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2261   +/-   ##
=======================================
  Coverage   94.64%   94.64%           
=======================================
  Files         102      102           
  Lines       23974    23974           
=======================================
  Hits        22690    22690           
  Misses       1284     1284           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ctz ctz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

My thoughts:: I'd prefer to concentrate on minimising any and all privileges for GHA (like this PR does), rather than try and affix on third party steps. I don't think it's feasible to review those, so we should treat them as untrustworthy and pre-compromised.

(This is also why I don't personally care for release-plz and similar, giving GHA rights to publish your crate feels like the first step on a very painful journey.)

@cpu

cpu commented Dec 6, 2024

Copy link
Copy Markdown
Member Author

My thoughts:: I'd prefer to concentrate on minimising any and all privileges for GHA (like this PR does), rather than try and affix on third party steps.

That aligns with my views. I appreciate that our CI is "boring". I won't bother with any follow-ups to switch to SHA pins.

(This is also why I don't personally care for release-plz and similar, giving GHA rights to publish your crate feels like the first step on a very painful journey.)

I'm warmer to the idea depending on specific context but for a crate like Rustls it feels like the wrong tradeoff 👍

@cpu
cpu added this pull request to the merge queue Dec 6, 2024
Merged via the queue into rustls:main with commit 00da0e7 Dec 6, 2024
@cpu
cpu deleted the cpu-dr-zizmor branch December 6, 2024 19:03
@djc

djc commented Dec 6, 2024

Copy link
Copy Markdown
Member

My thoughts:: I'd prefer to concentrate on minimising any and all privileges for GHA (like this PR does), rather than try and affix on third party steps. I don't think it's feasible to review those, so we should treat them as untrustworthy and pre-compromised.

Agreed that reviewing actions changes in any amount of depth is not feasible, so keeping scope minimal seems like the right direction to me.

(This is also why I don't personally care for release-plz and similar, giving GHA rights to publish your crate feels like the first step on a very painful journey.)

There will be first-class support for trusted publishing soonish so that might be a more interesting avenue to explore.

@A5rocks

A5rocks commented Dec 7, 2024

Copy link
Copy Markdown

If you run this tool in online mode w/ a GH_TOKEN it also flags several ref-confusion findings for our usage of install-action. I'm not 100% sure why it didn't flag the other instances where we specify dependent actions by tag (e.g. checkout@v4), but the fix in either case is to pin our actions by SHA hash. Since that's a bit more invasive I haven't made that change yet pending some discussion on whether it's something folks are on-board for.

I think this specific error code is because taiki-e/install-action has both a v2 tag and a v2 branch, so I suppose it's not immediately clear which one it uses in case they differ? Anyways that explains why actions/checkout@v4 isn't flagged (no v4 branch) and probably the solution would just be to tell taiki-e/install-action to only have one of either a tag or a branch...?

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.

4 participants