Commit 619362a
Background jobs, and three edges deliberately not drawn
The first edges in the graph that do not start at an account. They were worth
adding only once `finding_neighbourhood` existed to read them — `path_actors`
walks account-sourced edges alone, so adding these earlier would have been more
edges nothing reads, which is the mistake this whole arc began by fixing.
edges 75 -> 78
runs_as / schedules / runs_program 5 / 3 / 3
`check_job_privileged_step_user` had already written down what it wanted, and
could not say it: "the job->user edge is what makes 'this armed job runs as
DDIC' derivable". Third module in a row where the relationship was designed in a
comment and unexpressible in the contract.
MOST OF THIS CHANGE IS ABOUT THE EDGE NOT DRAWN.
JOBCMD-JOB-005 reports a low-privileged scheduler getting code executed under a
powerful step user. The obvious edge is scheduler -> step user, and it would be
wrong: it reads as "this account can act as that one", which is a conclusion a
reader draws from two facts rather than a relationship the export states. So it
is `user -schedules-> job` and `job -runs_as-> user`, and a test fails if a
user -> user edge is ever declared here. It is the same transitive claim
`why_not_the_transitive_edge` already refuses, wearing a different costume.
JOBCMD-JOB-003's own comment sketches "job -> program -> user", which reads as
though RSBDCOS0 runs as the step user. It does not: the job runs the program AND
the job runs as the user. Two edges from the job, and a test asserts nothing is
declared FROM the program.
`runs_as` points from the job, so it is deliberately NOT an actor edge. A job
borrows an identity; the user does not reach for the job, and answering "who is
standing on this path" with somebody a job impersonates would be a different
claim. `path_actors` leaves it alone; `finding_neighbourhood` surfaces it.
A COUNTER EARNING ITS PLACE. Adding the JOBCMD-JOB- rule pushed
`declined_ambiguous` from 1 to 2, because JOB-003 then matched a rule without
having declared its pairs — visible immediately in the scan output rather than
silently absent. Converting it brought the count back to 1.
5,502 pass with a database. 4 new tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 9e3feff commit 619362a
3 files changed
Lines changed: 135 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
23 | 44 | | |
24 | 45 | | |
25 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
386 | 387 | | |
387 | 388 | | |
388 | 389 | | |
| |||
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | 409 | | |
406 | 410 | | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
407 | 414 | | |
408 | 415 | | |
409 | 416 | | |
| |||
422 | 429 | | |
423 | 430 | | |
424 | 431 | | |
| 432 | + | |
425 | 433 | | |
426 | 434 | | |
427 | 435 | | |
| |||
447 | 455 | | |
448 | 456 | | |
449 | 457 | | |
| 458 | + | |
450 | 459 | | |
451 | 460 | | |
452 | 461 | | |
| |||
519 | 528 | | |
520 | 529 | | |
521 | 530 | | |
| 531 | + | |
522 | 532 | | |
523 | 533 | | |
524 | 534 | | |
| |||
541 | 551 | | |
542 | 552 | | |
543 | 553 | | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
544 | 566 | | |
545 | 567 | | |
546 | 568 | | |
| |||
558 | 580 | | |
559 | 581 | | |
560 | 582 | | |
| 583 | + | |
561 | 584 | | |
562 | 585 | | |
563 | 586 | | |
| |||
572 | 595 | | |
573 | 596 | | |
574 | 597 | | |
| 598 | + | |
575 | 599 | | |
576 | 600 | | |
577 | 601 | | |
| |||
599 | 623 | | |
600 | 624 | | |
601 | 625 | | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
602 | 629 | | |
603 | 630 | | |
604 | 631 | | |
| |||
615 | 642 | | |
616 | 643 | | |
617 | 644 | | |
| 645 | + | |
618 | 646 | | |
619 | 647 | | |
620 | 648 | | |
| |||
627 | 655 | | |
628 | 656 | | |
629 | 657 | | |
| 658 | + | |
630 | 659 | | |
631 | 660 | | |
632 | 661 | | |
| |||
640 | 669 | | |
641 | 670 | | |
642 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
643 | 686 | | |
644 | 687 | | |
645 | 688 | | |
| |||
656 | 699 | | |
657 | 700 | | |
658 | 701 | | |
| 702 | + | |
659 | 703 | | |
660 | 704 | | |
661 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
333 | 403 | | |
334 | 404 | | |
335 | 405 | | |
| |||
0 commit comments