Microsoft Xbox One Hacked

Post Syndicated from Bruce Schneier original https://www.schneier.com/blog/archives/2026/03/microsoft-xbox-hacked.html

It’s an impressive feat, over a decade after the box was released:

Since reset glitching wasn’t possible, Gaasedelen thought some voltage glitching could do the trick. So, instead of tinkering with the system rest pin(s) the hacker targeted the momentary collapse of the CPU voltage rail. This was quite a feat, as Gaasedelen couldn’t ‘see’ into the Xbox One, so had to develop new hardware introspection tools.

Eventually, the Bliss exploit was formulated, where two precise voltage glitches were made to land in succession. One skipped the loop where the ARM Cortex memory protection was setup. Then the Memcpy operation was targeted during the header read, allowing him to jump to the attacker-controlled data.

As a hardware attack against the boot ROM in silicon, Gaasedelen says the attack in unpatchable. Thus it is a complete compromise of the console allowing for loading unsigned code at every level, including the Hypervisor and OS. Moreover, Bliss allows access to the security processor so games, firmware, and so on can be decrypted.

Testing Step Functions workflows: a guide to the enhanced TestState API

Post Syndicated from D Surya Sai original https://aws.amazon.com/blogs/compute/testing-step-functions-workflows-a-guide-to-the-enhanced-teststate-api/

AWS Step Functions recently announced new enhancements to local testing capabilities for Step Functions, introducing API-based testing that developers can use to validate workflows before deploying to AWS. As detailed in our Announcement blog post, the TestState API transforms Step Functions development by enabling individual state testing in isolation or as complete workflows. This supports mocked responses and actual AWS service integrations, and provides advanced capabilities. These capabilities include Map/Parallel states, error simulation with retry mechanisms, context object validation, and detailed inspection metadata for comprehensive local testing of your serverless application.

The TestState API can be accessed through multiple interfaces such as AWS Command Line Interface (AWS CLI), AWS SDK, LocalStack. By default, TestState API in AWS CLI and SDK runs against the remote AWS endpoint, providing validation against the actual Step Functions service infrastructure. We’ve partnered with LocalStack to offer an additional testing endpoint for the TestState API. Developers can use LocalStack for unit testing their workflows by changing the AWS SDK client endpoint configuration to point to LocalStack: http://localhost.localstack.cloud:4566/ instead of AWS endpoint. This approach provides complete network isolation when needed. For a streamlined development experience, you can also use the LocalStack VSCode extension to automatically configure your environment to point to the LocalStack endpoint. This approach is detailed in the AWS blog post.

This blog post demonstrates building test suites to unit test your Step Functions workflows using the AWS SDK for Python using the pytest framework. The complete implementation is available in the GitHub repository.

Building test cases using the TestState API

This example workflow implements a real-world ecommerce order processing system using JSONata for advanced data transformations. It incorporates complex Step Functions patterns including distributed Map states, Parallel execution, and waitForTaskToken callback mechanisms. The process validates orders through AWS Lambda functions, distributes order item processing with configurable failure tolerance, runs parallel payment and inventory updates, handles human approval workflows using task tokens, then persists orders in Amazon DynamoDB with notification delivery. This workflow demonstrates advanced error handling with multiple Catchers and Retriers, exponential backoff for Lambda throttling and DynamoDB limits, and sophisticated state transitions that were previously challenging to test locally. This makes it the recommended choice for demonstrating the use of enhanced TestState API’s local testing features.

The complete workflow is available in the GitHub repository, where you can examine the full state machine definition and see how JSONata expressions handle data transformation throughout the execution flow.

Figure 1: State machine workflow that demonstrates a real-world ecommerce order processing system.

Figure 1: State machine workflow that demonstrates a real-world ecommerce order processing system.

Effective Step Functions testing requires a systematic approach to TestState API integration that provides state validation, error simulation, and assertion capabilities. The testing framework is built using Python’s pytest framework, using fixtures to automatically provide pre-configured runner instances that handle TestState API client initialization and state machine definition loading. This eliminates repetitive setup code and provides consistent test environments. The enhanced TestState API supports both mock integrations and actual integrations with AWS services, providing flexibility in testing strategies. For this demonstration, you use mock integrations to showcase how a complete local testing can be achieved without having any resources deployed to AWS accounts.

This framework is built for demonstration purposes, and you can similarly build your own testing frameworks using other programming languages like Java, Node.js. The testing framework uses method chaining patterns to create readable test cases with comprehensive assertion methods, automatic output chaining between state executions, and error simulation for testing retry mechanisms, backoff intervals, and catch blocks across AWS service error conditions.

The following test implementations demonstrate the testing capabilities that are achievable with the enhanced TestState API in local development environments. The test cases are run against the preceding Statemachine.

Test Case 1: Lambda throttling and retry mechanism testing

Service integrations with Statemachines like AWS Lambda, Amazon DynamoDB may face throttling depending on their usage. A key capability of the enhanced TestState API is its ability to simulate retry mechanisms with control over retry counts and backoff intervals. This test demonstrates the enhanced TestState API’s retry testing capabilities through the stateConfiguration.retrierRetryCount parameter and inspectionData.errorDetails response fields. This response field provides retryBackoffIntervalSeconds for validating exponential backoff calculations, retryIndex for tracking retry attempt sequences, and catchIndex for identifying which error handler processed the exception. These enhanced inspection capabilities enable validation of retry logic, backoff strategies, and error propagation patterns across complex state machine workflows.

def test_lambda_throttling_retry_mechanism(self, runner):
"""Test retry mechanism for Lambda.TooManyRequestsException"""
throttling_error = {
"Error": "Lambda.TooManyRequestsException",
"Cause": "Request rate exceeded"
}

# Test first retry attempt
(runner
.with_input({"orderId": "order-retry-test"})
.with_mock_error(throttling_error)
.with_retrier_retry_count(0)
.execute("ValidateOrder")
.assert_retriable()
.assert_error("Lambda.TooManyRequestsException"))

# Verify exponential backoff calculation
response = runner.get_response()
error_details = response['inspectionData']['errorDetails']
assert error_details['retryBackoffIntervalSeconds'] == 2

# Test retry exhaustion
(runner
.with_retrier_retry_count(3)
.execute("ValidateOrder")
.assert_caught_error()
.assert_next_state("ValidationFailed"))

Test Case 2: Map state testing with tolerance thresholds

Distributed Map states present unique testing challenges due to their parallel processing nature and failure tolerance capabilities. The enhanced TestState API provides specialized configuration options for testing these complex scenarios.

def test_map_state_tolerated_failure_threshold(self, runner):
"""Test Map state with tolerated failure threshold"""
test_input = {
"orderId": "order-map-test",
"orderItems": [
{"itemId": "item-1"}, {"itemId": "item-2"}, 
{"itemId": "item-3"}, {"itemId": "item-4"}
]
}

# Test normal Map state execution
map_success_result = [
{"itemId": "item-1", "processed": True},
{"itemId": "item-2", "processed": True}
]

(runner
.with_input(test_input)
.with_mock_result(map_success_result)
.execute("ProcessOrderItems")
.assert_succeeded()
.assert_next_state("ParallelProcessing"))

# Test tolerance threshold exceeded scenario
tolerance_error = {
"Error": "States.ExceedToleratedFailureThreshold",
"Cause": "Map state exceeded tolerated failure threshold"
}

(runner
.with_input(test_input)
.with_mock_error(tolerance_error)
.execute("ProcessOrderItems")
.assert_caught_error()
.assert_next_state("ValidationFailed"))

This test demonstrates the enhanced TestState API’s Map state testing capabilities through the stateConfiguration.mapIterationFailureCount parameter for simulating iteration failures. The API provides comprehensive inspection data including inspectionData.afterItemSelector for validating ItemSelector transformations, inspectionData.afterItemBatcher for batch processing validation, inspectionData.toleratedFailureCount and inspectionData.toleratedFailurePercentage for threshold verification. When the specified failure count exceeds the configured tolerance, the API correctly returns States.ExceedToleratedFailureThreshold, enabling testing of Map state resilience patterns.

Test Case 3: WaitForCallback pattern testing

The waitForCallback integration requires context object construction to simulate realistic execution environments, particularly for human approval workflows.

def test_context_object_usage_in_jsonata_expressions(self, runner):
"""Test Context object usage in waitForTaskToken scenarios"""
test_input = {
"orderId": "order-context-test",
"amount": 125.0
}

context_data = {
"Task": {"Token": "ahbdgftgehbdcndsjnwjkhas327yr4hendc73yehdb723y"},
"Execution": {
"Id": "arn:aws:states:us-east-1:123456789012:execution:test:exec-123"
},
"State": {
"Name": "WaitForApproval",
"EnteredTime": "2025-01-15T10:45:00Z"
}
}

mock_result = {
"approved": True,
"taskToken": "ahbdgftgehbdcndsjnwjkhas327yr4hendc73yehdb723y"
}

(runner
.with_input(test_input)
.with_context(context_data)
.with_mock_result(mock_result)
.execute("WaitForApproval")
.assert_succeeded()
.assert_next_state("CheckApproval"))

# Verify JSONata expressions processed context correctly
response = runner.get_response()
after_args = json.loads(response['inspectionData']['afterArguments'])
assert after_args['Payload']['taskToken'] == context_data['Task']['Token']

This test demonstrates the enhanced TestState API’s support for waitForCallback integrations through the `context` parameter for realistic Context object simulation. The API enables comprehensive testing of JSONata expressions that reference $states.context.Task.Token, $states.context.Execution.Id, and other context fields. The inspectionData.afterArguments response field validates that JSONata expressions correctly processed the context data, while the API automatically handles the complexity of task token embedding in service integration payloads for waitForCallback testing scenarios.

Test Case 4: Happy path testing – complete workflow validation

Happy path testing validates that workflows execute correctly under normal operating conditions. The enhanced TestState API allows you to chain state executions together, automatically passing outputs between states to simulate a complete workflow execution.

def test_complete_order_processing_workflow(self, runner):
"""Integration test: Complete happy path workflow using method chaining"""
test_input = {
"orderId": "order-12345",
"amount": 150.75,
"customerEmail": "[email protected]",
"orderItems": [
{"itemId": "item-1", "quantity": 2, "price": 50.25}
]
}

# Test ValidateOrder state
(runner
.with_input(test_input)
.with_mock_result({"statusCode": 200, "isValid": True})
.execute("ValidateOrder")
.assert_succeeded()
.assert_next_state("CheckValidation"))

# Test CheckValidation choice state (no mock needed)
validation_output = runner.get_output()
(runner
.with_input(validation_output)
.clear_mocks()
.execute("CheckValidation")
.assert_succeeded()
.assert_next_state("ProcessOrderItems"))

This test demonstrates how the TestState API maintains state context between executions, enabling realistic workflow simulation. The get_output() method retrieves the processed output from one state to use as input for the next, mimicking actual Step Functions execution behavior.

Note: The code snippet above shows only the first two states of the complete workflow test for brevity. The full test code with all states (ProcessOrderItems, ParallelProcessing, WaitForApproval, CheckApproval, SaveOrderDetails, and SendNotification) can be viewed in the complete GitHub repository, demonstrating end-to-end workflow validation using the same method chaining pattern.

Integration with modern CI/CD pipelines

In this section, we will explore how to integrate the previous unit tests in a CI CD pipeline to enable local testing.

The sample repository includes a GitHub Actions workflow that demonstrates how TestState API testing integrates into continuous integration and continuous delivery (CI/CD) pipelines. The workflow (.github/workflows/test-and-deploy.yml) provides a two-step process that validates before any AWS resources are deployed using AWS Serverless Application Model (AWS SAM).

The CI/CD pipeline follows the following pattern:

  1. Unit Tests: Executes the complete TestState API test suite using pytest tests/unit_test.py -v
  2. SAM Deploy: Deploys AWS resources using sam build and sam deploy

To enable the GitHub Actions workflow to deploy resources to your AWS account, configure these AWS credentials in your GitHub repository settings. For detailed setup instructions, see the AWS blog post.

Following are the required secrets to be configured in GitHub repository settings:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_REGION

In production environments, you can typically extend this basic pipeline to include additional stages. The enhanced pipeline often begins with deploying to a development account first, followed by integration testing against deployed resources. The final stage involves moving to production with proper approval gates and security scanning compliance checks.

Conclusion

The enhanced TestState API enables testing Step Functions workflows locally without requiring AWS deployments that accelerated development cycles, and reduce testing times. This post demonstrates how to implement testing for state types including Map states with tolerance thresholds, retry mechanisms with exponential backoff, and waitForTaskToken patterns with context object simulation using mock integrations for isolated testing.

By integrating TestState API testing into CI/CD pipelines, you can validate workflow logic before deployment, reducing the risk of production issues. The GitHub Actions workflow example demonstrates an implementation that runs tests and deploys resources in a controlled sequence. The complete code examples and testing framework are available in the GitHub repository to implement similar testing practices for Step Functions workflows.


Седмицата (16–21 март)

Post Syndicated from Надежда Радулова original https://www.toest.bg/sedmitsata-16-21-mart/

Седмицата (16–21 март)

Живеем (ли) в свободен свят. Трудно е да отговорим с да или не. Още по-трудно е, ако разполагаме с повече от една дума за отговор.

Ако се позовем на есето на Александър Драганов „Свобода без удавници“, теориите за понятието свобода на политически философи като Исая Бърлин, Джералд Макалън и Дейвид Милър се оказват всъщност стъписващо приложими във всекидневните казуси, по които всички държим да се изкажем – (все по-рядко) на маса, (все по-често) в социалните мрежи.

Свобода без удавници
Какво е свободата? Дали е едно нещо, или може да означава различни неща? Как да я упражняваме, без да започнем да се избиваме помежду си? По тази тема разсъждава Александър Драганов.
Седмицата (16–21 март)

Пример за „отрицателна“ или за „положителна“ свобода (по Бърлин) е например „скандалното“ – поради изваждането му от контекста на разговора – изказване на Тимъти Шаламе, че в днешно време на никого не му пука за операта и балета, изказване, което струваше на актьора (засега) един „Оскар“? И трябва ли някой да бъде санкциониран заради свободно изказано мнение? Да или не? Ами ако едно такова мнение, пък било то изкривено от медиите, има негативен ефект върху голяма група от хора и дейността, която извършват? (Отделен въпрос е, че думите на Шаламе всъщност предизвикаха мащабен разговор за опера и балет, какъвто отдавна не се беше водил.) Ами ако изказващият мнението е обект на парасоциална връзка за милиони зрители, които се оказват предадени и разочаровани?

Морално ли е нечия свобода да е на такава цена? Да или не? И игнорирайки пречките пред собствената ни свобода (ограничения, социални конвенции и пр.), не отнемаме ли условията за свобода на някой друг? Да или не? Но също така не е ли част от индивидуалната ни свобода понякога да не знаем отговора, да нямаме категорична позиция или изобщо позиция, да се съмняваме, да се разколебаваме, да променяме мнението си? Или може би в епохата на „мрежовата“ ни свързаност нямаме право просто ей така да отвъртим електрическата крушка и да се изключим? Или пък да я оставим неубедително да примигва?

Няма нищо лошо в сложните въпроси с променлив отговор, така си мисля аз. Важното е да ги разграничаваме от простите, например: да гласувам ли, или не? Еднозначният отговор на този въпрос е израз на свобода, която не накърнява ничия друга свобода. Свобода, която е добре да се упражнява толкова често, колкото времето и обстоятелствата налагат.

Както сами ще се убедите, тази седмица

свободата е пътуваща тема из текстовете в броя.

Да вземем например съвременното изкуство, което свободно се намесва в публичните пространства и независимо дали е социално ангажирано, или не, променя средата. Накърнява ли тази намеса градския контекст, или напротив – прави видими пластове, към които окото ни е станало нечувствително вследствие на инерцията. Чували ли сте за джобните статуи на Михай Колодко, които през последните години изникват на най-различни и често пъти невъобразими места из Будапеща като израз на необременена от социалните конвенции свобода? Особено в контекста на режима на Орбан този творчески акт има и сериозен политически заряд. Струва си да се види на живо. Обнадеждава някак. Но дори и да не планирате скорошно пътуване до унгарската столица, може да се разходите и да откриете полутайните човечета и предмети с помощта на Нева Мичева и завладяващия ѝ пътеписен разказ „Будапеща на Колодко – толкова много истории“.

Будапеща на Колодко – толкова много истории
Будапеща е очарователна през пролетта. И не само заради изпитаните от десетилетия туристически маршрути. Вече съществуват и нови, полутайни. За един възможен от тях разказва Нева Мичева. Последвайте я и открийте миниатюрните, възникнали като насън джобни статуи на Михай Колодко.
Седмицата (16–21 март)

И ако пътуването, дори въображаемото, продължава да бъде израз на свобода, особено за поколенията, родени отсам несъществуващата от вече 37 години желязна завеса, то на пръв поглед усядането в семействени форми под знака на родовата памет изглежда точно обратното. Не обаче и в романа на Мария Роса Лохо, за който Стефан Иванов ни разказва в „На второ четене: „Родословно дърво“. Къде се пресичат реалното и фантастичното в биографиите ни? Колко свободни трябва да бъдем, за да конструираме идентичностите си отвъд документа, по-близо до мита? Чуйте само как освобождаващо звучи твърдението на Стефан, че

родовата памет се оказва ненадежден архив.

И още:

Произходът е разказ. Гените могат да покажат откъде идват телата ни, но не могат да възстановят историите, които са изградили нашата идентичност.

На второ четене: „Родословно дърво“
Родова памет и мит, идентичност и конструиране на биографичното: това са основните нишки, които заплитат романа, представен ни от Стефан Иванов „на второ четене“. Заедно с въпроса къде се пресичат реалното и фантастичното, докато изграждаме камък по камък разказа за живота си.
Седмицата (16–21 март)

Част от тези истории, които камък по камък градят истинските ни вътрешни биографии и „родствата ни по избор“, всъщност са измислени – разказани, написани, изсвирени, нарисувани – в повечето случаи от някой друг. Или пък са изиграни. Да, точно така, игрите също са особена форма на упражняване на свобода, в която реалността се оказва уплътнена и умножена, правилата и ролите – доброволно приети, а играещите – в ситуация на непрестанен избор, включително кога да излязат от играта. На етиката, естетиката и механиката на видеоигрите, които са съществена част от живота на играещите, е посветена месечната рубрика „Игромислие“, а този път тема на разговора са първите 14 игри от „Класацията“ на игромислещите. Първа цедка“.

„Класацията“ на игромислещите. Първа цедка
Игромислещите обсъждат класацията на най-добрите – или може би най-паметните за тях – игри. От предложените от всеки 25 заглавия 14 са споделени с поне още един. Тази седмица са представени въпросните 14 по азбучен ред. Ще се появят ли „на втора цедка“ още съвпадения, ще научим след месец.
Седмицата (16–21 март)

И ако игромислещите класират любимите си игри, в партийните централи се класират кандидатите в изборните листи. Емилия Милчева обръща внимание най-вече на „крепежните“ лица в листите на „Прогресивна България“, които се оказват предимно спортисти медалисти. Хитър ход, реабилитиращ чувството за национална гордост сред електората, особено след кресливите патриотарски лозунги на „Възраждане“, от които ушите ни дълго ще пищят. Друг е въпросът, че в случая става дума за не по-малко тенекиен популизъм, от онези, които циклично ни завъртат в центрофугата си – на кратка програма, колкото да поизперат някоя и друга мозъчна клетка. Повече за настоящето и за близкото бъдеще на „Прогресивна България“, както и за всякакви други предизборни явления, „сияния“ и „ускорения“ четете в анализа на Емилия „Коремно възлизане през април“.

Коремно възлизане през април
Кампанията тръгва с разместване на силите, нови играчи и познати лица в нови роли. Данните се люлеят, коалициите са отворени, а протестният вот търси поредния си носител. Въпросът вече е не кой води, а с кого и докъде може да стигне. Коментар на Емилия Милчева.
Седмицата (16–21 март)

Но да оставим близкото бъдеще и изборите и да се върнем в сегашния миг, който тази седмица носи на екипа ни мъничко тъга. Спомняте ли си трогателната финална сцена от култовия филм „Извънземното“, в която, преди да се качи в кораба и да потегли към дома си, Е.T. прави онзи магически жест на нераздяла с Елиът, чрез който остава в сърцето и ума на момчето?

Нещо такова се случва в поредния и последен епизод от рубриката „Т.Е. от Е.Т.“. Забележителната Елена Телбис, която в продължение на една година гастролира в екипа на „Тоест“ и изгради свой суперспециален седмичен „извънземен“ коментарен жанр, се завръща на собствената си актьорска планета. Обещаваме си (с намигване), че това не е завинаги и че този „филм“ ще има скорошно продължение. Казваме adieu на Елена с неувяхващата хризантема на нашето приятелство и в знак на нераздяла.

И докато продължаваме да се питаме в свободен свят ли живеем, едни войни около нас набират скорост, други мъчително тлеят, трети чакат мига, в който да се разгорят. За разлика от моето поколение едно време, днешните деца се страхуват от войната, от възможността светът да свърши; заспиват трудно; задават смразяващи родителите въпроси.

Миналата седмица се качвам в трамвая и чувам няколко хлапета да се питат едно друго какво (и дали?) един ден ще разказват на своите деца – за пандемията от ковид, за Украйна, за последвалите войни… Говорят по техния си небрежен тийнейджърски начин, уж лежерно, неангажирано. Обсъждат и някаква изоставена недостроена сграда в покрайнините на София, където можело да се скрият при нужда; не става ясно от какво.

Слизам от трамвая и понеже съм била хлапе в друго време, припявам си парче от друго време – Keep on rockin' in the free world… Всъщност от 1989-та, когато Нийл Йънг написва песента, до днес светът не се е променил кой знае колко: вместо Буш имаме Тръмп; вместо едни войни – други. И точно както се пее в парчето, по улиците продължава да има бездомни, а някои деца никога няма да тръгнат на училище, нито да се влюбят, нито да пораснат…

Keep on rockin' in the free world…

… А на нас не ни остава друго, освен да посрещнем поредната пролет и упорито да продължим да упражняваме свободата си, колкото и напразно да изглежда това днес.

Ако в момента четете този седмичен бюлетин, значи вече морално ни подкрепяте, за което ви благодарим от сърце. Това е прекрасно, но за съжаление, невинаги е достатъчно… Затова не подминавайте бутона по-долу – без финансовата ви подкрепа не бихме могли да съществуваме.

The collective thoughts of the interwebz