Skip to content

Commit

Permalink
code gen updates (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHinck authored May 14, 2024
1 parent ee7fe29 commit d9e67f9
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 12 deletions.
7 changes: 6 additions & 1 deletion cmd/ui/src/ducks/explore/saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,12 @@ function* runCypherSearchQuery(payload: CypherQueryRequest): SagaIterator {

if (resultNodesAreEmpty && !resultEdgesAreEmpty) {
yield put(putGraphData({}));
yield put(addSnackbar('The results are not rendered since only edges were returned', 'cypherSearchOnlyContainsEdges'));
yield put(
addSnackbar(
'The results are not rendered since only edges were returned',
'cypherSearchOnlyContainsEdges'
)
);
} else if (resultNodesAreEmpty && resultEdgesAreEmpty) {
yield put(putGraphData({}));
yield put(addSnackbar('Command completed successfully', 'cypherSuccessResponse'));
Expand Down
16 changes: 16 additions & 0 deletions packages/go/dawgs/graph/node_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2024 Specter Ops, Inc.
//
// Licensed under the Apache License, Version 2.0
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

package graph_test

import (
Expand Down
16 changes: 16 additions & 0 deletions packages/go/dawgs/graph/path_internal_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2024 Specter Ops, Inc.
//
// Licensed under the Apache License, Version 2.0
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

package graph

import (
Expand Down
16 changes: 16 additions & 0 deletions packages/go/dawgs/graph/relationships_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
// Copyright 2024 Specter Ops, Inc.
//
// Licensed under the Apache License, Version 2.0
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: Apache-2.0

package graph_test

import (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,28 @@ const Abuse: FC = () => {
<>
<Typography variant='body2'>
This role can be used to grant yourself or another principal any privilege you want against Automation
Accounts, VMs, Key Vaults, and Resource Groups. For example, you can make yourself an administrator of
Accounts, VMs, Key Vaults, and Resource Groups. For example, you can make yourself an administrator of
an Azure Subscription by assigning the Owner role at the Subscription scope.
</Typography>

<Typography variant='body2'>
The simplest way to execute this attack is to use the Azure portal to add a new, abusable role
assignment against the target object for yourself.
The simplest way to execute this attack is to use the Azure portal to add a new, abusable role
assignment against the target object for yourself.
</Typography>

<Typography variant='body2'>
If this role is assigned to a Service Principal, you won't be able to authenticate directly to the
Azure portal. In this case:
If this role is assigned to a Service Principal, you won't be able to authenticate directly to the Azure
portal. In this case:
</Typography>

<Typography variant='body2'>
You'll need to acquire a bearer token for the service principal with AzureRM as the audience.
This can be done using BARK's Get-AzureRMTokenWithClientCredentials cmdlet.

You'll need to acquire a bearer token for the service principal with AzureRM as the audience. This can
be done using BARK's Get-AzureRMTokenWithClientCredentials cmdlet.
</Typography>

<Typography variant='body2'>
Using that token, you can make a call to the AzureRM API to create a new role assignment on the
target object, such as assigning yourself the Owner role. This can be done using BARK's
Using that token, you can make a call to the AzureRM API to create a new role assignment on the target
object, such as assigning yourself the Owner role. This can be done using BARK's
New-AzureRMRoleAssignment cmdlet.
</Typography>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { Typography } from '@mui/material';
const General: FC = () => {
return (
<Typography variant='body2'>
The User Access Administrator role can manage user access to Azure resources, assign roles in Azure RBAC,
The User Access Administrator role can manage user access to Azure resources, assign roles in Azure RBAC,
and assign the Owner role to themselves or others.
</Typography>
);
Expand Down

0 comments on commit d9e67f9

Please sign in to comment.